473,587 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1819
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*********@pr agmadev.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
1647
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 and angle.' It is not clear to me how gd handles point size. A fontsize of 12 should be 12/72 = 1/6 inches tall but how does gd decide what an...
0
1371
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 number? In the GD FAQ, there is an entry about missing colors in JPEG images
1
2045
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) draw the window without any geometry setting, (2) fetch the geometry of the drawn window, (3) set the minimum window size to be this size, and then...
5
3740
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 contains a compiled dll. Is it enough to put it in /Windows/System32?
14
2063
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 page by using <div id=div1 style="position:absolute; top:200; left:400; width:200; height:200; z-index:1; background-image:url(ole01.jpg);...
0
2273
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 to get Interseciton, Union etc. Any information would be much appreciated. Thanks Phil
2
1536
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 unfoldPic() { TELLER++; if (TELLER <= 80) { CURR_PIC.style.clip = 'rect(0px 400px ' + TELLER + 'px 0px)'; window.setTimeout('unfoldPic()', 30); }
9
3403
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 viewport onto the images. Then I use javascript to make the two images scroll through the viewport - the second image is just there to fill the gaps...
0
1330
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 different in size than the panel size. I'd like the graphics object's clipping region (is "clipping region" the right terminology?) to be the same size as...
0
8339
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7967
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5712
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3872
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.