|  | Home · All Classes · Modules

# QPainterPath.Element Class Reference
[QtGui module]

The QPainterPath.Element class specifies the position and type of a subpath. More...

### Methods

- __init__ (self)
- __init__ (self, Element)
- bool isCurveTo (self)
- bool isLineTo (self)
- bool isMoveTo (self)

### Special Methods

- bool __eq__ (self, Element e)
- bool __ne__ (self, Element e)

### Members

- ElementType type
- float x
- float y

## Detailed Description

The QPainterPath.Element class specifies the position and type of a subpath.

Once a QPainterPath object is constructed, subpaths like lines and curves can be added to the path (creating QPainterPath.LineToElement and QPainterPath.CurveToElement components).

The lines and curves stretch from the currentPosition() to the position passed as argument. The currentPosition() of the QPainterPath object is always the end position of the last subpath that was added (or the initial start point). The moveTo() function can be used to move the currentPosition() without adding a line or curve, creating a QPainterPath.MoveToElement component.

## Method Documentation

### Element.__init__ (self)

### Element.__init__ (self, Element)

### bool Element.isCurveTo (self)

Returns true if the element is a curve, otherwise returns false.

See also type and QPainterPath.CurveToElement.

### bool Element.isLineTo (self)

Returns true if the element is a line, otherwise returns false.

See also type and QPainterPath.LineToElement.

### bool Element.isMoveTo (self)

Returns true if the element is moving the current position, otherwise returns false.

See also type and QPainterPath.MoveToElement.

### bool Element.__eq__ (self, Element e)

### bool Element.__ne__ (self, Element e)

## Member Documentation

### ElementType type

This variable holds the type of element.

See also isCurveTo(), isLineTo(), and isMoveTo().

### float x

This variable holds the x coordinate of the element's position.

See also operator QPointF().

### float y

This variable holds the y coordinate of the element's position.

See also operator QPointF().