How to properly clip a gnome canvas item during render?



Hello,
I am building a custom anti-aliased GnomeCanvasItem.  The item can be
much larger than what is visible on the screen.  As such, I only want to
compute the SVP of the visible portion of the item since it is
inefficient to recompute the SVP every time an update is called.  I've
read the gnomecanvas architecture docs, and I read that I need to set up
the SVPs in the update method, then render to the pixbuf in the render
method.  update takes an affine and a clip SVP as arguments.  Can I use
either of these to compute the bbox of the portion of the item that
needs to be redrawn?  I've looked at the source code for a couple of the
canvas items, and I don't see any intelligent clipping being done (ie,
for the canvas line, the SVP for the entire line is always generated
regardless if there are segments fully outside the visible area).

Thanks for any help,
Jason





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]