Re: ipeqt::Canvas clipping

Otfried Cheong <[email protected]>
Newsgroups gmane.comp.graphics.ipe.general
Organization Ipe Headquarters
Message-ID <[email protected]>
On 11/05/2010 02:19 PM, Otfried Cheong wrote:
> ipeqt::Canvas does not provide an option to clip the objects to the
> paper. You could add that easily, though, by inserting something like
> this at the beginning of Canvas::drawObjects(cairo_t *cc) (I haven't
> checked it, but this should work):
>
> const Layout *l = iCascade->findLayout();
> cairo_rectangle(cc, -l->iOrigin.x, -l->iOrigin.y,
> l->iPaperSize.x, l->iPaperSize.y);
> cairo_clip(cc)
>
> I would be happy to add this to the Canvas class (with an option to turn
> it on or off, of course) if it fills a need and you are actually reusing
> ipeqt::Canvas in your code.

If you just use Canvas to visualize some Ipe objects that you create 
only for this purpose, you could of course also simply enclose all Ipe 
objects in a ipe::Group and set a clipping path on that group.

Otfried
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.