Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > gdmodule clipping

Reply
Thread Tools

gdmodule clipping

 
 
John Hunter
Guest
Posts: n/a
 
      09-11-2003

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

 
Reply With Quote
 
 
 
 
Eric Brunel
Guest
Posts: n/a
 
      09-12-2003
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 <> -
PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ANN: GDmodule 0.53 released Chris Gonnerman Python 1 06-11-2004 12:28 PM
GD/gdmodule on Win XP Eduardo Elgueta Python 5 02-03-2004 08:44 PM
gdmodule max colors John Hunter Python 0 11-02-2003 06:56 PM
Re: [Python] gdmodule true type font size John Hunter Python 1 09-17-2003 02:11 PM
gdmodule true type font size John Hunter Python 0 09-13-2003 05:43 PM



Advertisments