[cairo] Image drawing questions

Ian Britten britten at caris.com
Tue Sep 9 14:18:32 PDT 2008


Hi all,
I'm trying to get our existing framework to draw it's images
using Cairo, but am not having much success, mostly in getting
the image positioned/scaled/rotated correctly...

I see two separate possible approaches, and am not sure of the
pros/cons of them, and was wondering if someone could clarify,
so I could focus on just one.  (sigh - The *vast* majority of
my time seems to be going into transformation problems, rather
than functionality...  :(  )

For both cases, I have my ImageSurface populated correctly (I
believe) with the raw image data.
[ BTW - What way do the rows increase in the image surface?  Is
it top-to-bottom, or bottom-to-top? ]

Case 1:  In this case, I'm working toward calling
Context::set_source(Surface, x, y), and am mucking about with
the transformation of the context itself.

Case 1:  In this case, I'm working toward calling
Context::set_source(Pattern), and am making a SurfacePattern
from my Surface, and am trying to configure the Matrix on it.

What, if anything, is the difference?
Thanks for any info!
Ian


More information about the cairo mailing list