[cairo] Paint a image in Cairo surface X11
Guillermo Rodriguez
guillerodriguez.dev at gmail.com
Mon Feb 8 13:46:42 CET 2016
Hello,
> On 02/05/2016 06:15 PM, Uli Schlachter wrote:
> > In X11, you have to handle redraws (Expose events).
>
> this was my idea too.
>
> > Thanks, attached is a fixed version (well, I am lazy; an Expose event contains
> > information about which part of the window needs to be redrawn; the code just
> > redraws everything).
>
> does not work either.
>
> I'm under fvwm here, debiqn testing.
> Starting with a big image (let's say 800x800)
> and a window size of 100x100, the Expose event
> handler does not display anything.
>
> Things start to work when I resize the window.
> If the new width or height is > 800
> (I didn't check the exact limit, something bigger
> than source image) then Expose works fine.
I get exactly the same results and found the following:
If the window size is equal to or smaller than the image size, then
the image is not displayed initially (although it will show up if the
window is resized). I can reproduce this 100% of the time.
If the window size is at least ONE pixel size larger than the image
size, in any of the two directions (either width or height), then the
image is shown initially. Again this happens 100% of the time.
Don't know what's going on internally but I'd say it does not look
like a race condition.
Best,
Guillermo Rodriguez
More information about the cairo
mailing list