Re: SVG & PS/EPS surfaces

Tomas By <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
Hi,

Well, this code is simplified. I have various `drawings' (ie the 
recording surfaces) that I combine to create the files. Then I also have 
a GUI app that displays the images, for use in development. All this was 
done in Guile Scheme.

It seems to me now that what I will have to do is (1) create the 
drawings in C, to produce both EPS files, and also PNG files, for use in 
the GUI, and then (2) have the GUI load the PNG file into an image 
surface, to display. A somewhat less optimal solution.

/Tomas



On 2015-08-02 20:25, Emmanuel Pacaud wrote:
> Why are you using an intermediate surface ? The following code should
> do the same:
> 
> fs = cairo_ps_surface_create("test.eps",100.0,100.0);
> cairo_ps_surface_set_eps(fs,1);
> cr = cairo_create(fs);
>   (drawing commands on cr)
> cairo_destroy(cr);
> cairo_surface_finish(fs);
> 
> Anyway, if you have to use intermediate surface, use
> cairo_surface_create_similar.
> 
> 	Cheers,
> 
> 		Emmanuel.

-- 
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.