[cairo] Memory usage in OpenGL Cairo UI

Matt Rice ratmice at gmail.com
Tue Oct 20 00:46:39 PDT 2009


On Mon, Oct 19, 2009 at 9:39 PM, Stephen Gentle
<stephen at stephengentle.com> wrote:
>
> 2. I use only one surface and have all the controls draw directly onto that
>
> So option 2 sounds better, but I'm not
> sure if its possible. I would want the cairo context to act as if the
> coordinates 0,0 were the top left hand corner of the widget that I'm
> drawing, and not the top corner of the window. I can create a clip
> region around the control to stop it drawing to other areas of the
> screen, but it draws in the wrong place. Is there a way to change the
> coordinate system to fix this?

it sounds like you want cairo_translate()

http://cairographics.org/manual/cairo-transformations.html#cairo-translate


More information about the cairo mailing list