[cairo] Using Cairo and Pango to scroll text on video
perry.werneck at gmail.com
Sat May 12 07:35:19 PDT 2012
I *think* this 1x1 surface is not needed; Why not use the original surface
as reference to get the text extents and then create a similar surface
for the text? If they´re similar the text size will not change.
2012/5/11 Maarten Bosmans <mkbosmans at gmail.com>
> 2012/5/11 <robertk54 at aol.com>:
> > Is there a way to render the entire text to a
> > cairo surface whole? As far as I can see one needs a cairo surface
> > creating the pango layout. However, in my case, I do not know the
> > dimensions of the cairo surface needed until after I start working in
> You need to do it in 2 steps. First create a 1x1 surface and a
> corresponding layout. Then use the measured size to create a second
> surface to dray the text to.
> The layouting of the text is done twice in this approach. I don't know
> of a way around that, but don't think it is a problem, performance
> cairo mailing list
> cairo at cairographics.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo