[cairo] Question regarding recording surfaces

Zoltán Turányi teknos at gmail.com
Fri Feb 25 08:26:09 PST 2011


Hi,

I plan to use recording surfaces to create a drawing and then replay it into
a window using different scaling factors (as the user zooms in). I read the
documentation and it seems to say that recording surfaces record the
high-level drawing commands - from which I would expect a high resolution
output if replayed on a high resolution target surface (appropriate scaling
applied to the context onto which it is being replayed).

I do not seem to be able to get this behaviour. In the below code I draw
some text and I replay it onto a PNG surface with 2x magnification. Yet the
text and line comes out as blurred - as if it were already rendered to some
bitmap on the recording surface (instead of just being recorded as a
show_text and a stroke). (See attachment.)

Is this something fundamental or am I doing something wrong?

As an additional comment: if I create the recording surface with no extents
given (NULL), the text and line does not replay onto the target surface at
all. Any hints on why?

Thanks in advance,
Zoltan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20110225/13d0cb35/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: result.png
Type: image/png
Size: 5642 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20110225/13d0cb35/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-csrc
Size: 1511 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20110225/13d0cb35/attachment.c>


More information about the cairo mailing list