By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,983 Members | 1,627 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,983 IT Pros & Developers. It's quick & easy.

gdmodule clipping

P: n/a

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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.