[cairo] Problems with InvalidateRect under Windows
tim at framstag.com
Mon Jun 7 01:40:08 PDT 2010
Thanks for your response!
> I'm using Cairo under Windows with the same approach and have not
> experienced any problems with InvalidateRect. InvalidateRect expects
> coordinates in what Cairo calls device space, so make sure the rectangle you
> pass to InvalidateRect is defined in device space rather than user space.
> Call cairo_user_to_device to convert from user space to device space.
I already tested converting the coordinates 10, 10 using cairo user_to_device and device_to_user conversion methods and in both cases got 10,10 back, which leads me to the assumption that user and device coordinates are the same in my case (identity matrix). Note also that the same code work perfectly if I use Windows native drawing functionality and using cairo under X11, so it is likely a problem in the interoperation between Windows and cairo.
Could you send me (or point me at) the code for your windows and HDC initialization. Possibly there is a difference between your and my code that triggers my problem. Can you also state which versions of cairo and pixmap you use?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo