Le Tue, 7 Jun 2016 09:40:16 +0200,
Gert-Ludwig Ingold <[email protected]> a écrit :

> Hallo René,
> 
> >> do you mean something like the clipping done in this example:
> >> http://pyx.sourceforge.net/examples/drawing2/clipping.html ?
> > 
> > Jein :)
> > 
> > yes if the remaining of black rectangle disappears;
> > no otherwise.
> 
> Probably, the example is already too complex for your question because
> it inserts the clipped canvas (cl) into another canvas (c). How about
> the following?
> 
> 
> from pyx import *
> 
> clippath = path.circle(0, 0, 1)
> drawpath = path.line(-2, -2, 1.2, 2)
> 
> c = canvas.canvas([canvas.clip(clippath)])
> c.stroke(drawpath, [color.rgb.red, style.linewidth(1.0)])
> 
> c.writeEPSfile("clipping")
> c.writePDFfile("clipping")
> c.writeSVGfile("clipping")
> 
> 
> That is probably what you are aiming at.

Yes!

Many thanks to you and to PyX!

René
> 
> > It is possible to crop with external means (convert from
> > ImageMagick or PyPDF2).
> 
> That should not be necessary.
> 
> Best regards,
> Gert
> 



-- 
René Bastian
www.pythoneon.org

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to