[cairo] Call to cairo_paint triggers an assertion

Tim Corio tcorio at rochester.rr.com
Wed Jan 6 10:43:54 PST 2010


My bad.  I've been working with a few variations of this code and got a
bit lost when I wrote my last note.  The actual, current code is below.
The actual symptom is the white background from the pixmap is drawn in
the destination image, but the source image is not copied.

Chris Wilson, I'll look into the NO_WINDOW GtkMisc.  Can you show a
small sample of its use?

In researching this problem I find that others have tried to implement
rotation by an arbitrary amount in a GTK application.  I assume they've
all eventually found a working solution, but none was posted.  Once I
get this working I'll post the program here to help out the next person
with this problem.

Thank You,
Tim

On Wed, 2010-01-06 at 16:42 +0000, Chris Wilson wrote:
> On Wed, 06 Jan 2010 11:14:41 -0500, Tim Corio <tcorio at rochester.rr.com> wrote:
> > Now, it no longer crashes, but the resulting image is garbled.  It may
> > be a very skewed copy of the original.
> > 
> > If each line was skewed by one pixel the image would be recognizable,
> > but at a 45 degree tilt.  In this case the image is unrecognizable, but
> > the mix of pixel colors look about right.
> 
> Almost as if you tried to use a 24-bpp packed pixel representation as a
> 32-bit xRGB surface...
> 
> To put it mildly you have fallen foul of GTK+'s poor integration of
> Cairo and GdkPixbuf. Hmm, I actually hope that the current version of
> Cairo throws an error given these inputs.
> 
> Personally, I just subclass a plain NO_WINDOW GtkMisc widget for my Cairo
> drawing routines.
> -ickle
> 



More information about the cairo mailing list