That should work fine. In fact, if I modify my code to use the DC returned by BeginPaint it renders just fine apart from the horrible flickering.<br><br><div class="gmail_quote">On Mon, Jun 7, 2010 at 4:35 PM, Tim Teulings <span dir="ltr"><<a href="mailto:tim@framstag.com">tim@framstag.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hello!<div class="im"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi. I'm using Cairo 1.8.10 (precompiled from the GTK+ for Windows page).<br>
I don't know what version of pixman, if any, it's compiled against.<br>
</blockquote>
<br></div>
OK, that is different.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
My drawing code looks like this:<br>
</blockquote>
<br></div>
You are creating an offscreen buffer to draw into and then copy the content of the buffer back to original HDC. This is similar what I'm doing under X11 (should use double buffering support for a better version of it) but under Windows I'm just doing:<br>
<br>
dc=::BeginPaint(wnd,&ps);<br>
<br>
surface=cairo_win32_surface_create(dc);<br>
cairo=cairo_create(surface);<br>
<br>
and use that surface and cairo_t for direct drawing into the DC returned by BeginPaint().<br>
<br>
Shoulden't this work, too (it does not always - as described)?<div><div></div><div class="h5"><br>
<br>
-- <br>
Gruß...<br>
Tim<br>
<br>
--<br>
cairo mailing list<br>
<a href="mailto:cairo@cairographics.org" target="_blank">cairo@cairographics.org</a><br>
<a href="http://lists.cairographics.org/mailman/listinfo/cairo" target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a><br>
</div></div></blockquote></div><br>