gdmodule clipping

J

John Hunter

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
 
E

Eric Brunel

John said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top