QPainterPath::Element Class
class QPainterPath::ElementQPainterPath::Element 类用于指定子路径的位置和类型。更多内容...
公共函数
| bool | isCurveTo() const |
| bool | isLineTo() const |
| bool | isMoveTo() const |
| operator QPointF() const | |
| bool | operator!=(const QPainterPath::Element &other) const |
| bool | operator==(const QPainterPath::Element &other) const |
公共变量
详细说明
一旦创建了QPainterPath 对象,就可以将线段和曲线等子路径添加到路径中(从而创建QPainterPath::LineToElement 和QPainterPath::CurveToElement 组件)。
线段和曲线从currentPosition ()延伸到作为参数传递的位置。QPainterPath 对象的currentPosition ()始终是最后添加的子路径的终点(或初始起点)。moveTo ()函数可用于在不添加线段或曲线的情况下移动currentPosition (),从而创建QPainterPath::MoveToElement 组件。
另请参阅 QPainterPath 。
成员函数文档
bool Element::isCurveTo() const
如果该元素是曲线,则返回true ;否则返回false 。
另请参阅 type 和QPainterPath::CurveToElement 。
bool Element::isLineTo() const
如果该元素为一行,则返回true ;否则返回false 。
另请参阅 type 和QPainterPath::LineToElement 。
bool Element::isMoveTo() const
如果元素正在移动当前位置,则返回true ;否则返回false 。
另请参阅 type 和QPainterPath::MoveToElement 。
Element::operator QPointF() const
返回该元素的位置。
bool Element::operator!=(const QPainterPath::Element &other) const
如果该元素不等于other ,则返回true ;否则返回false 。
另请参阅 operator==()。
bool Element::operator==(const QPainterPath::Element &other) const
如果该元素等于other ,则返回true ;否则返回false 。
另请参阅 operator!=()。
成员变量文档
QPainterPath::ElementType Element::type
该变量存储元素的类型
另请参阅 isCurveTo()、isLineTo() 和isMoveTo()。
qreal Element::x
该变量存储了该元素位置的 x 坐标。
另请参阅 operator QPointF() 。
qreal Element::y
该变量存储了该元素位置的 y 坐标。
另请参阅 operator QPointF() 。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.