Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QPainterPath::Element Class Reference

\inmodule QtGui More...

#include <qpainterpath.h>

+ Collaboration diagram for QPainterPath::Element:

Public Member Functions

bool isMoveTo () const
 Returns true if the element is moving the current position, otherwise returns false.
 
bool isLineTo () const
 Returns true if the element is a line, otherwise returns false.
 
bool isCurveTo () const
 Returns true if the element is a curve, otherwise returns false.
 
 operator QPointF () const
 Returns the element's position.
 
bool operator== (const Element &e) const
 \variable QPainterPath::Element::x
 
bool operator!= (const Element &e) const
 

Public Attributes

qreal x
 
qreal y
 
ElementType type
 

Detailed Description

\inmodule QtGui

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 38 of file qpainterpath.h.

Member Function Documentation

◆ isCurveTo()

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 46 of file qpainterpath.h.

Referenced by QQuickVectorImageGenerator::Utils::toSvgString().

+ Here is the caller graph for this function:

◆ isLineTo()

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 45 of file qpainterpath.h.

Referenced by QQuickVectorImageGenerator::Utils::toSvgString().

+ Here is the caller graph for this function:

◆ isMoveTo()

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 44 of file qpainterpath.h.

Referenced by QQuickVectorImageGenerator::Utils::toSvgString().

+ Here is the caller graph for this function:

◆ operator QPointF()

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

Returns the element's position.

See also
x, y

Definition at line 48 of file qpainterpath.h.

◆ operator!=()

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 52 of file qpainterpath.h.

References operator==().

+ Here is the call graph for this function:

◆ operator==()

bool QPainterPath::Element::operator== ( const Element & other) const
inline

\variable QPainterPath::Element::x

the x coordinate of the element's position.

See also
{operator QPointF()}

\variable QPainterPath::Element::y

the y coordinate of the element's position.

See also
{operator QPointF()}

\variable QPainterPath::Element::type

the type of element

See also
isCurveTo(), isLineTo(), isMoveTo()
Since
4.2

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

See also
operator!=()

Definition at line 50 of file qpainterpath.h.

References qFuzzyCompare(), type, x, and y.

+ Here is the call graph for this function:

Member Data Documentation

◆ type

◆ x

◆ y


The documentation for this class was generated from the following files: