goocanvas.Polyline — A polyline item (a series of lines with optional arrows).
class goocanvas.Polyline(goocanvas.ItemSimple): |
Functions
def goocanvas.polyline_new_line(parent, x1, y1, x2, y2, properties)+-- gobject.GObject +-- goocanvas.ItemSimple +-- goocanvas.Polyline
|
goocanvas.Polyline implements goocanvas.Item
goocanvas.Polyline(properties=None)| properties : | A comma separated list of properties. |
| Returns : | A new goocanvas.Polyline |
Creates a new canvas polyline item.
Here's an example showing how to create a filled triangle with vertices at (100,100), (300,100), and (200,300).
p_points = goocanvas.Points([(100.0, 100.0), (300.0, 100.0), (200.0, 300.0)]) polyline = goocanvas.Polyline(points=p_points, close_path=True, stroke_color="red", fill_color="blue")
def goocanvas.polyline_new_line(parent, x1, y1, x2, y2, properties)| parent : | The parent item, or None. |
| x1 : | The x coordinate of the start of the line. |
| y1 : | The y coordinate of the start of the line. |
| x2 : | The x coordinate of the end of the line. |
| y2 : | The y coordinate of the end of the line. |
| properties : | A comma separated list of properties. |
Creates a new polyline item with a single line.