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 ().