Re: Cairo and wxWidgets Crash

Hakki Dogusan <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
Hi,

28-01-2014 03:26 tarihinde, WC Black yazdı:
> I am writing an app using Cairo and wxWidgets. There is an odd behavior
> that happens in Cairo 1.12.16 that did not happen when I compiled with
> previous Cairo version, namely the ones precompiled in gtk+ bundle 3.2.6
> I believe.
>
> When I modify the path data the strange behavior arises where the cairo
> object will cover up the wxDC drawn nodes and will not appear to draw on
> the context outside of the set device origins. Occasionally when I drag
> the object outside of the device origin bounds it will crash. I've
> provided a link to the call stack along with a link to the screenshot of
> the weird behavior.
>
> Thanks.
>
>
> Cairo version: cairo 1.12.16
> Operating System: Windows 7
> Compiler: MS VC
>
> The following is a link to the call stack after a crash:
> http://pastebin.com/raw.php?i=VwiVaTuZ
>
> The following is a link to the image of the weird behavior:
> http://i.imgur.com/9SrCACx.png
>


Did you apply the attached patch?


--
Regards,
Hakki Dogusan
http://www.dynaset.org/dogusanh

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
cairo-win32-display-surface.c.patch (text/x-patch, 971 B)
--- cairo-win32-display-surface.c.orig	2013-08-26 18:07:20.000000000 +0300
+++ cairo-win32-display-surface.c	2013-09-12 13:16:20.000000000 +0300
@@ -455,17 +455,17 @@
 	surface->fallback =
 	    _cairo_win32_display_surface_create_for_dc (surface->win32.dc,
 							surface->win32.format,
-							surface->win32.extents.width,
-							surface->win32.extents.height);
+							surface->win32.extents.x + surface->win32.extents.width,
+							surface->win32.extents.y + surface->win32.extents.height);
 	if (unlikely (status = surface->fallback->status))
 	    goto err;
 
 	if (!BitBlt (to_win32_surface(surface->fallback)->dc,
-		     0, 0,
+		     surface->win32.extents.x, surface->win32.extents.y,
 		     surface->win32.extents.width,
 		     surface->win32.extents.height,
 		     surface->win32.dc,
-		     0, 0,
+		     surface->win32.extents.x, surface->win32.extents.y,
 		     SRCCOPY)) {
 	    status = _cairo_error (CAIRO_STATUS_DEVICE_ERROR);
 	    goto err;
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.