473,394 Members | 1,902 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

gdmodule clipping


Does gd lib or gdmodule support clipping? I would like to set a clip
rectangle and when I issue drawing commands (like im.polygon) have
only the part of the polygon inside the clip rectangle displayed.

Thanks,
John Hunter

gd-2.0.15
gdmodule-0.42

Jul 18 '05 #1
1 1805
John Hunter wrote:
Does gd lib or gdmodule support clipping? I would like to set a clip
rectangle and when I issue drawing commands (like im.polygon) have
only the part of the polygon inside the clip rectangle displayed.


AFAIK, gd doesn't support it natively. But since your clipping region seems to
be a rectangle, I suppose you could do this by creating a new image having the
size of your clipping region, draw in this image, then put it back in your main
image via image.copyTo(...)

HTH
--
- Eric Brunel <er*********@pragmadev.com> -
PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: John Hunter | last post by:
When using gdmodule to draw text using true type fonts im.string_ttf(font, fontsize, angle, (x,y), s, color) the docs say 'draw string s at (x,y) using the TrueType font at the given pointsize...
0
by: John Hunter | last post by:
GD module has a constant gdMaxColors >From the web page: Maximum number of colors in an image; GD will likely change this figure in a future version. Is there any way to increase this...
1
by: Douglas Alan | last post by:
Is there a way to tell Tkinter that I'd like to allow a window to be resizable, but only down to the point where no widget clipping occurs? I know that to get the effect I want, I can always (1)...
5
by: Eduardo Elgueta | last post by:
Hi All, I'm trying to setup matplotlib (http://matplotlib.sourceforge.net/) in a Win XP box. I have two questions: 1. How do I install the GD Lib (http://www.boutell.com/gd)? The zip...
14
by: Doug van Vianen | last post by:
Hi, I am trying to show a clipped part of a picture on a webpage and move it on the page and/or change the clipping to a different part of the picture. I show the picture in the body of the...
0
by: phil cunningham | last post by:
Does anyone know of a good library to handle Polygon clipping in C#. This would require clipping of shapes with FLOAT verteces and we need the capability of clipping one Polygon against another...
2
by: Pugi! | last post by:
I am currently experimenting a bit with clipping (with banners). 1. Is it possible to do more then one clipping on a image. For example: image of 400px x 80 px: var TELLER = 0; function...
9
by: Andy Baxter | last post by:
hello, I'm writing a panoramic image viewer in html / javascript. The idea is I have a div with two identical panoramic photographs embedded in it. The clipping on the div is set to make it a...
0
by: dongarbage | last post by:
Hi there, I have a panel that I'm trying to draw lines on based on mouse events. I'm using a Graphics object to do this. However, the region that the graphics object will draw lines in is...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.