goocanvas.Path — A Path item.
class goocanvas.Path(goocanvas.ItemSimple): |
+-- gobject.GObject +-- goocanvas.ItemSimple +-- goocanvas.Path
|
goocanvas.Path implements goocanvas.Item
goocanvas.Path(properties=None)
properties : | A comma separated list of properties. |
Returns : | A new goocanvas.Path |
Creates a new canvas path item.
Here's an example showing how to create a red line from (20,20) to (40,40):
path = goocanvas.Path(data="M 20 20 L 40 40", stroke_color="red")
This example creates a cubic bezier curve from (20,100) to (100,100) with the control points at (20,50) and (100,50):
path = goocanvas.Path(data="M20,100 C20,50 100,50 100,100", stroke_color="blue")
This example uses an elliptical arc to create a filled circle with one quarter missing:
path = goocanvas.Path(data="M200,500 h-150 a150,150 0 1,0 150,-150 z", fill_color="red", stroke_color="blue", line_width=5.0,)