goocanvas.EllipseModel
Prev | PyGooCanvas Canvas Item Models Reference | Next

## goocanvas.EllipseModel

goocanvas.EllipseModel — A model for ellipse items.

## Synopsis

    class goocanvas.EllipseModel(goocanvas.ItemSimpleModel):
        goocanvas.EllipseModel(properties=None)

## Ancestry

    +-- gobject.GObject
    	+-- goocanvas.ItemModelSimple
    		+-- goocanvas.EllipseModel

## goocanvas.EllipseModel Properties

"center_x" | Read/Write | The x coordinate of the center of the ellipse. Default value: 0.
"center_y" | Read/Write | The y coordinate of the center of the ellipse. Default value: 0.
"radius_x" | Read/Write | The horizontal radius of the ellipse. Allowed values: >= 0. Default value: 0.
"radius_y" | Read/Write | The vertical radius of the ellipse. Allowed values: >= 0. Default value: 0.

## Implemented Interfaces

`goocanvas.EllipseModel` implements `goocanvas.ItemModel`

## Description

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

## Constructor

        goocanvas.EllipseModel(properties=None)

`properties` : | 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)

Prev | Up | Next
PyGooCanvas Canvas Item Models Reference | Home | goocanvas.GridModel