[cairo] SVG & PS/EPS surfaces

Tomas By tomas at basun.net
Sun Aug 2 08:44:47 PDT 2015


But all the files (PS, PDF, SVG) are pixels, not vectors??

I create one surface (have tried all three types above) on which I draw, 
using lines/arcs.

Then I create a 2nd surface, and do (in C terms):

   cairo_set_source_surface(cr_of_2nd_surface,1st_surface,0,0);
   cairo_paint(cr_of_2nd_surface);

Have tried various combinations of surface types: SVG+PS, PS+PS, 
PDF+PDF, probably a couple more. All the resulting files, as far as I 
can tell, are raster not vector.

Using recording surface for #1 would seem to rule out the possibility 
that the pixellation happens already in the first step.

(The reason for two surfaces is that I want a smaller number of images 
that I then combine in the files.)

/Tomas



On 2015-08-02 17:26, Stefan Salewski wrote:
> Cairo is generally vector based -- when you draw on PDF, SVG, PS and
> similar surfaces, the result is generally vector based. For PNG surface
> for example you will get pixel result, because PNG is pixel based.
> 
> In your initial post you wrote that you first draw SVG elements and 
> then
> "paint" to PS. I dont know how exactly you did that, but maybe there is
> the problem. Try to use the desired surface from the beginning.
> 
> I do not think that the recording surface will help you.



More information about the cairo mailing list