Re: Using Cairo and Pango to scroll text on video

Maarten Bosmans <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CA+CvcKQmn7Xc1zo-yF_TTrScqXDVPgesRY+xYwBwv9ouRwEgZg@mail.gmail.com>
Please make sure that you also include the mailing list in the CC.

>>Another workaround is to prerender the text to a similar surface
>>(cairo_surface_create_similar) and paint that intermediate surface to
>>the destination surface with the correct offset.
>
> Would using the latter method prevent me from using semi-transparent text
> and / or backgrounds?

It would not if you pass CAIRO_CONTENT_COLOR_ALPHA to the function, see
http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-create-similar

Prerendering the text is much faster that having to render the text
again in every frame. It's only really a reasonable shortcut when the
text is only translated and perhaps rotated, but not zoomed though.

Maarten
--
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.