On Tue, 24 Jun 2008 01:40:14 -0300, "bulia byak" wrote:
Everything should work and behave exactly as before, except a little faster, and except the temporary regressions outlined below. Note that this only concerns canvas items; regular objects are still rendered as before. Total cairofication has become closer but we're not there yet.
Hi Bulia,
This seems really interesting!
Help me and my inkscape newbie-ness. What's a canvas vs. a regular object? Or, what buttons do I have to push in the inkscape UI to trigger cairo-based drawing.
1 For some reason, drawing the canvasbuf onto the screen using cairo is very slow. So I had to keep the old method using gdk_draw_rgb_image_dithalign, which is faster even though it involves a 32bpp->24bpp conversion because gdk can only deal with 24bpp. This is controlled by the define CANVAS_OUTPUT_VIA_CAIRO in sp-canvas.cpp; uncomment it to use the cairo output. Can any cairo guru guess what is going wrong here?
This one I definitely want to take a look at. I'll see if I can do that this week.
2 Cairo cannot draw over the past content of the buffer with inversion. The XOR operator does not result in inversion, or at least I couldn't figure out how. So, the text selection (Shift+arrows over) had to become semitransparent blue instead of black with inversion. Hopefully this will be possible to fix with a future version of cairo.
You are correct that CAIRO_OPERATOR_XOR, (the Porter-Duff XOR operator), has nothing to do with a bitwise-XOR operation. Cairo doesn't have any bitwise operations, (what would it mean to try to do that when targeting something like a PostScript or PDF target that doesn't have any bits?).
I think you just want to make inkscape draw something different here. But I'm open to suggestions for new cairo API here, (as long as it makes sense for all cairo backends).
-Carl