Re: SVG & PS/EPS surfaces

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

Thanks. Yes, this makes sense. This should work for me also.

I guess I was thinking too functionally (and what I have now seems to 
work fine).

(Plus, I struggle too see how a recording surface can be an output 
device.)

/Tomas



On 2015-08-03 13:41, Andreas Lobinger wrote:
> Hello, (i might write something stupid here, because the thread isn't
> somehow fully available to me)
> 
> to combine drawings i use drawing functions that operate on a context
> with some input parameters/data and just call them sequentially.
> 
> function draw_frame(cr)
>   save(cr)
>   pathconstruction -> fill/stroke
>   restore(cr)
> end
> 
> function draw_xg(cr, right_shift)
>   save(cr)
>   translate(cr,right_shift,0)
>   pathconstruction -> fill/stroke
>   restore(cr)
> end
> 
> # main
> i = Cairo.image_surface(400,300,RGBA)
> cr = CarioContext(i)
> 
> draw_frame(cr)
> for l in 10:10:120
>      draw_xg(cr,l)
>      end
> 
> save_to_png(i)
> 
> or similar. Also in the cases where i is a vector surface i get vector
> output with it (obviously not on .png)
> Using surfaces as sources can lead to rasterization - i had some
> problems (but this was pre-1.14, and i never checked again) with
> recording surfaces and scaling before painting. I rather see surfaces
> as output devices.
> Some intermediate drawing -if needed- can be done by push/pop groups.
> 
> But i think i agree, it should be clearer in documentation, in which
> steps rasterization is enforced.
> 
> Wishing a happy day,
>           Andreas

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