Re: Paint a image in Cairo surface X11

Guillermo Rodriguez <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CABDcavYMwt4Atn2fANnh+mowCKNZo+8Vz6KAR-FG40n4ddfksg@mail.gmail.com>
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
-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.