Element 类

( QPainterPath::Element )

The QPainterPath::Element 类指定子路径的位置及类型。 更多...

头: #include <Element>

公共函数

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

公共变量

ElementType type
qreal x
qreal y

详细描述

The QPainterPath::Element 类指定子路径的位置及类型。

一旦 QPainterPath 对象被构造,就可以把像直线和曲线的子路径添加到路径 (创建 QPainterPath::LineToElement and QPainterPath::CurveToElement 组件)。

直线和曲线拉伸从 currentPosition () 到作为自变量的传递位置。 currentPosition () 对于 QPainterPath 对象始终是最后添加子路径的结束位置 (或初始起始点)。 moveTo () 函数可以用于移动 currentPosition () 无需添加直线 (或曲线),创建 QPainterPath::MoveToElement 组件。

另请参阅 QPainterPath .

成员函数文档编制

bool Element:: isCurveTo () const

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

另请参阅 type and QPainterPath::CurveToElement .

bool Element:: isLineTo () const

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

另请参阅 type and QPainterPath::LineToElement .

bool Element:: isMoveTo () const

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

另请参阅 type and QPainterPath::MoveToElement .

Element:: operator QPointF () const

返回元素的位置。

另请参阅 x and y .

bool Element:: operator!= (const Element & other ) const

Returns true if this element is not equal to other ;否则返回 false。

该函数在 Qt 4.2 引入。

另请参阅 operator== ().

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

Returns true if this element is equal to other ;否则返回 false。

该函数在 Qt 4.2 引入。

另请参阅 operator!= ().

成员变量文档编制

ElementType Element:: type

This variable holds the type of element.

另请参阅 isCurveTo (), isLineTo (),和 isMoveTo ().

qreal Element:: x

此变量保持元素位置的 X 坐标。

另请参阅 operator QPointF ().

qreal Element:: y

此变量保持元素位置的 Y 坐标。

另请参阅 operator QPointF ().