gdmodule clipping

Discussion in 'Python' started by John Hunter, Sep 11, 2003.

  1. John Hunter

    John Hunter Guest

    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
     
    John Hunter, Sep 11, 2003
    #1
    1. Advertising

  2. John Hunter

    Eric Brunel Guest

    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
     
    Eric Brunel, Sep 12, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Hunter

    gdmodule true type font size

    John Hunter, Sep 13, 2003, in forum: Python
    Replies:
    0
    Views:
    310
    John Hunter
    Sep 13, 2003
  2. John Hunter
    Replies:
    1
    Views:
    315
    Eric Brunel
    Sep 17, 2003
  3. John Hunter

    gdmodule max colors

    John Hunter, Nov 2, 2003, in forum: Python
    Replies:
    0
    Views:
    284
    John Hunter
    Nov 2, 2003
  4. Eduardo Elgueta

    GD/gdmodule on Win XP

    Eduardo Elgueta, Feb 2, 2004, in forum: Python
    Replies:
    5
    Views:
    496
    Eduardo Elgueta
    Feb 3, 2004
  5. Chris Gonnerman

    ANN: GDmodule 0.53 released

    Chris Gonnerman, Jun 11, 2004, in forum: Python
    Replies:
    1
    Views:
    284
    Chris Gonnerman
    Jun 11, 2004
Loading...

Share This Page