[cairo] Image drawing questions

Mohit Sindhwani tech at onghu.com
Tue Sep 9 18:08:10 PDT 2008

Hi Ian

Let me take the one that I know for sure!

In an image surface, the top left is 0,0.  I'm just about to embark on 
transformations, so the answers to your question will help me also.


Ian Britten wrote:
> 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
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo

More information about the cairo mailing list