[cairo] A Couple of questions about text

Jerónimo Barraco jerobarraco at yahoo.com.ar
Tue Apr 20 19:57:55 PDT 2010


Hello, my name is Jerónimo this is the first time i write to the list.

I've been searching for some information but couldn't find what i was
looking for, so i wanna ask kindly if someone here can answer me some
questions.

I'm doing a software wich renders animated text over a video, it basically
re-renders everything for every frame, so is very cpu-intensive.
also, the context get recreated every frame (is because i need to use the
video buffer).

I was trying this approach, every frame i set every property (font size
and colours) and then render the text using text_path.
I've tried caching the path using ctx.copy_path, but seems slower.
And i emulate some things like blur and particles using patterns and
surfaces.

* Does cairo cache the path for text, so when i call text_path is actually
faster than calling append_path with the previous copy?
* Its faster to use a surface for repetitive painting or converting it to
a pattern? (i use this for blur, with get_group_target)
* Creating a matrix object doesnt requiere a lot of cpu time, right?

and a lot more but those are the most important.
If someone want to take a look at the software or the code to understand
more, please ask me.


Thanks in advance.
JBM



More information about the cairo mailing list