eric4.E4Canvas.E4CanvasRectangle

Module implementing a canvas item subclass for a rectangle.

Classes

E4CanvasRectangle Class implementing a rectangle canvas item subclass.

Functions

None


E4CanvasRectangle

Class implementing a rectangle canvas item subclass.

Derived from

E4CanvasItem

Methods

E4CanvasRectangle Constructor
drawShape Public method to draw the shape.
height Public method to get the height of the rectangle.
setSize Public method to set the rectangles size.
width Public method to get the width of the rectangle.

E4CanvasRectangle (Constructor)

E4CanvasRectangle(canvas, origin = QPointF(0.0, 0.0), size = QSizeF(0.0, 0.0))

Constructor

canvas
reference to the canvas object (E4Canvas)
origin
origin of the rectangle (QPointF)
size
size of the rectangle (QSizeF)

E4CanvasRectangle.drawShape

drawShape(painter)

Public method to draw the shape.

painter
reference to the painter object (QPainter)

E4CanvasRectangle.height

height()

Public method to get the height of the rectangle.

Returns:
height of the rectangle (float)

E4CanvasRectangle.setSize

setSize(width, height)

Public method to set the rectangles size.

width
width of the rectangle (float)
height
height of the rectangle (float)

E4CanvasRectangle.width

width()

Public method to get the width of the rectangle.

Returns:
width of the rectangle (float)

Up