QPainterPath::Element Class Reference

#include <qpainterpath.h>

List of all members.


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.

See also:
QPainterPath

Definition at line 54 of file qpainterpath.h.

Public Member Functions

bool isMoveTo () const
bool isLineTo () const
bool isCurveTo () const
 operator QPointF () const
bool operator== (const Element &e) const
bool operator!= (const Element &e) const

Public Attributes

qreal x
qreal y
ElementType type


Member Function Documentation

bool QPainterPath::Element::isMoveTo (  )  const [inline]

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

See also:
type, QPainterPath::MoveToElement

Definition at line 60 of file qpainterpath.h.

References type.

00060 { return type == MoveToElement; }

bool QPainterPath::Element::isLineTo (  )  const [inline]

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

See also:
type, QPainterPath::LineToElement

Definition at line 61 of file qpainterpath.h.

References type.

00061 { return type == LineToElement; }

bool QPainterPath::Element::isCurveTo (  )  const [inline]

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

See also:
type, QPainterPath::CurveToElement

Definition at line 62 of file qpainterpath.h.

References type.

00062 { return type == CurveToElement; }

QPainterPath::Element::operator QPointF (  )  const [inline]

Returns the element's position.

See also:
x, y

Definition at line 64 of file qpainterpath.h.

References x, and y.

00064 { return QPointF(x, y); }

bool QPainterPath::Element::operator== ( const Element other  )  const [inline]

the x coordinate of the element's position.the y coordinate of the element's position.the type of element

Since:
4.2
Returns true if this element is equal to other; otherwise returns false.

See also:
operator!=()

Definition at line 66 of file qpainterpath.h.

References type, type, x, x, y, and y.

00066                                                 { return qFuzzyCompare(x, e.x)
00067             && qFuzzyCompare(y, e.y) && type == e.type; }

bool QPainterPath::Element::operator!= ( const Element other  )  const [inline]

Since:
4.2
Returns true if this element is not equal to other; otherwise returns false.

See also:
operator==()

Definition at line 68 of file qpainterpath.h.

References operator==().

00068 { return !operator==(e); }

Here is the call graph for this function:


Member Data Documentation

qreal QPainterPath::Element::x

Definition at line 56 of file qpainterpath.h.

Referenced by charString(), QPainterPathData::close(), convertPath(), QPainterPathData::isClosed(), operator==(), qt_painterpath_split(), qt_svg_compose_path(), QPainterPath::quadTo(), QPainterPath::setElementPositionAt(), and QPainterPath::toReversed().

qreal QPainterPath::Element::y

Definition at line 57 of file qpainterpath.h.

Referenced by charString(), QPainterPathData::close(), convertPath(), QPainterPathData::isClosed(), operator==(), qt_painterpath_split(), qt_svg_compose_path(), QPainterPath::quadTo(), QPainterPath::setElementPositionAt(), and QPainterPath::toReversed().

ElementType QPainterPath::Element::type

Definition at line 58 of file qpainterpath.h.

Referenced by QPainterPath::isEmpty(), QPainterPathData::maybeMoveTo(), operator==(), qt_svg_compose_path(), and QPainterPath::toReversed().


The documentation for this class was generated from the following files:
Generated on Thu Mar 15 18:36:43 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1