[cairo] Memory usage in OpenGL Cairo UI

Stephen Gentle stephen at stephengentle.com
Tue Oct 20 01:18:18 PDT 2009

On Tue, Oct 20, 2009 at 5:46 PM, Matt Rice <ratmice at gmail.com> wrote:
> 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

That works perfectly, thanks! I thought there must be a way but I
couldn't find it.

Do you think this is the best way to go then?

More information about the cairo mailing list