Element 類

class QPainterPath ::Element

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

公共函數

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

公共變量

QPainterPath::ElementType type
qreal x
qreal y

詳細描述

一旦 QPainterPath 對象被構造,就可以把像直綫和麯綫的子路徑添加到路徑 (創建 QPainterPath::LineToElement and QPainterPath::CurveToElement 組件)。

直綫和麯綫拉伸從 currentPosition () 到作為自變量的傳遞位置。 currentPosition () 對於 QPainterPath 對象始終是最後添加子路徑的結束位置 (或初始起始點)。 moveTo () 函數可以用於移動 currentPosition () 無需添加直綫 (或麯綫),創建 QPainterPath::MoveToElement 組件。

另請參閱 QPainterPath .

成員函數文檔編製

bool Element:: isCurveTo () const

返迴 true 若元素是麯綫,否則返迴 false .

另請參閱 type and QPainterPath::CurveToElement .

bool Element:: isLineTo () const

返迴 true 若元素是直綫,否則返迴 false .

另請參閱 type and QPainterPath::LineToElement .

bool Element:: isMoveTo () const

返迴 true 若元素在移動當前位置,否則返迴 false .

另請參閱 type and QPainterPath::MoveToElement .

QPointF Element:: operator QPointF () const

返迴元素的位置。

另請參閱 x and y .

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

返迴 true 若此元素不等於 other ;否則返迴 false .

該函數在 Qt 4.2 引入。

另請參閱 operator== ().

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

返迴 true 若此元素等於 other ;否則返迴 false .

該函數在 Qt 4.2 引入。

另請參閱 operator!= ().

成員變量文檔編製

QPainterPath::ElementType Element:: type

此變量保持元素的類型

另請參閱 isCurveTo (), isLineTo (),和 isMoveTo ().

qreal Element:: x

此變量保持元素位置的 X 坐標。

另請參閱 operator QPointF ().

qreal Element:: y

此變量保持元素位置的 Y 坐標。

另請參閱 operator QPointF ().