[cairo] request for cairo_win32_surface_get_width/height()

Theo Veenker T.J.G.Veenker at uu.nl
Tue Apr 28 01:08:58 PDT 2009


I like to request cairo_win32_surface_get_width/height() to be added to
the win32 surface support. Cairo_win32_surface_create() uses GetClipBox()
to determine the size to be used for the surface. But when calling
cairo_win32_surface_create() from a WM_WINDOWPOSCHANGED or WM_SIZE
notification GetClipBox() initially returns a NULLREGION (although the
notification reports the actual window size) and then later it clip
region becomes valid. There is no way of telling which size the actual
surface has once it has been created. I can hack my way around it, but
having these APIs would be nice.

Note, this is probably only relevant when keeping the surface around
(recreating it on resize). When you create/destroy on WM_PAINT, there
won't be a problem because there will be a valid clip box.

Was't there a suggestion once to add a generic cairo_surface_get_width/


More information about the cairo mailing list