[Ipe-discuss] ipeqt::Canvas clipping

Dmitriy Morozov ipe at foxcub.org
Fri Nov 5 07:06:10 CET 2010


> As far as I can tell, you are the first to want to use ipeqt::Canvas outside
> of Ipe.

Do I win a prize? :-)

> 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)

Thanks! That worked like a charm.

> 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.

I think it would be a useful (and low-key) addition. May I also
request that you install ipeqtcanvas.h header file along with the rest
of them; right now it gets left behind?

I'm not doing much with Canvas (yet). For now I just put together a
little "IpePresenter", mostly to learn how things work. It presents
the slides in a separate window (shown full screen on the projector)
while keeping a window with current slide, next slide, time countdown,
and notes on the laptop screen. This reminds me. It would be great if
we could store per-page notes in the ipe files themselves. Right now
it's not possible (they have to live in a separate file). If you were
Ok with it, Ipe could get a little dialog to add the notes, and store
them in the files. Then one could use this for presentations without
fear of getting notes and slides out of sync. What do you think?

Thanks for your help.
Dmitriy



More information about the Ipe-discuss mailing list