[cairo] Using Cairo and Pango to scroll text on video

Maarten Bosmans mkbosmans at gmail.com
Tue May 8 02:54:48 PDT 2012


2012/5/7  <robertk54 at aol.com>:
> I would love to pre-render the text but I think my use case makes it a bit
> more complex.
>
> The video frame is a fixed size ARGB surface which makes sense.  However,
> the text can
> be any size and often much wider than the video image.  I imagine this
> prevents me from being
> able to use 'create similar' since this would be using the video frame's
> surface, no?  I guess
>
> I could create a new ARGB image surface using the text dimensions?

I you could just be bothered to click the link I provided to you
earlier, you would see that the arguments for the
cairo_surface_create_similar () function exactly address your
concerns.

Maarten


More information about the cairo mailing list