[cairo] request for cairo_win32_surface_get_width/height()

Theo Veenker T.J.G.Veenker at uu.nl
Tue Apr 28 11:59:39 PDT 2009


Vladimir Vukicevic wrote:
> On 4/28/09 1:08 AM, Theo Veenker wrote:
>> Hi,
>>
>> 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.
> 
> You really shouldn't be doing any rendering from WM_WINDOWPOSCHANGED or 
> WM_SIZE..

I don't do any rendering from those. Just recreating the surface. It
will be drawn on WM_PAINT.

Theo


More information about the cairo mailing list