goocanvas.EllipseModel — A model for ellipse items.
class goocanvas.EllipseModel(goocanvas.ItemSimpleModel): |
|
goocanvas.EllipseModel
represents a model for ellipse items. It is a subclass of
goocanvas.ItemModelSimple
and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width".
It also implements the goocanvas.ItemModel
interface, so you can use the goocanvas.ItemModel
functions such as goocanvas.ItemModel.raise_()
and goocanvas.ItemModel.rotate()
.
To respond to events such as mouse clicks on the ellipse you must connect to the signal handlers
of the corresponding goocanvas.Ellipse
objects. (See get_item
and
GooCanvas::item-created.)
goocanvas.EllipseModel(properties
=None)
| A comma separated properties as **kwargs. |
Returns: | A new
goocanvas.EllipseModel
|
Creates a new canvas ellipse item.
Here's an example showing how to create an ellipse centered at (100.0, 100.0), with a horizontal radius of 50.0 and a vertical radius of 30.0. It is drawn with a red outline with a width of 5.0 and filled with blue:
ellipse_model = goocanvas.EllipseModel(parent = root, center_x=100, center_y=100, radius_x=50, radius_y=30, stroke_color="red", fill_color="blue", line_width=5.0)