[cairo] Screen orientation
Behdad Esfahbod
behdad at behdad.org
Mon Dec 10 13:02:37 PST 2007
On Mon, 2007-12-10 at 08:32 -0500, Jean-Claude Repetto wrote:
> Hello,
Hi,
> I am using Cairo in a handheld device with a LCD screen. The device has
> a frame buffer, so I am using Cairo image surfaces to draw directly into
> the frame buffer.
> Unfortunately, some of the devices have been manufactured with a LCD
> screen rotated of 90 degrees. I have tried to use a Cairo transformation
> matrix. It works, but it is much slower.
May it be the case that you are rotating around a pixel center instead
of origin? I doubt that myself.
> Is there a possibility of avoiding the cost of a matrix multiplication ?
> Changing the orientation requires only a swap between X and Y, and/or a
> substraction.
No, at least not yet. You should profile though and see what's being
slow.
> Naturally, I could write two versions of the application, but I'd prefer
> avoid this solution. A solution with two versions of the Cairo library
> is acceptable.
>
> Thanks for your suggestions,
> Jean-Claude
Have fun with cairo!
--
behdad
http://behdad.org/
...very few phenomena can pull someone out of Deep Hack Mode, with two
noted exceptions: being struck by lightning, or worse, your *computer*
being struck by lightning. -- Matt Welsh
More information about the cairo
mailing list