En esta página

QPainterPath::Element Class

class QPainterPath::Element

La clase QPainterPath::Element especifica la posición y el tipo de un subcamino. Más...

Funciones públicas

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

Variables públicas

QPainterPath::ElementType type
qreal x
qreal y

Descripción detallada

Una vez construido un objeto QPainterPath, se pueden añadir subtrayectorias como líneas y curvas a la trayectoria (creando componentes QPainterPath::LineToElement y QPainterPath::CurveToElement ).

Las líneas y curvas se extienden desde el currentPosition() hasta la posición pasada como argumento. El currentPosition() del objeto QPainterPath es siempre la posición final del último subtrayecto que se añadió (o el punto de inicio inicial). La función moveTo() puede utilizarse para desplazar el currentPosition() sin añadir una línea o curva, creando un componente QPainterPath::MoveToElement.

Véase también QPainterPath.

Documentación de funciones miembro

bool Element::isCurveTo() const

Devuelve true si el elemento es una curva, en caso contrario devuelve false.

Véase también type y QPainterPath::CurveToElement.

bool Element::isLineTo() const

Devuelve true si el elemento es una línea, en caso contrario devuelve false.

Véase también type y QPainterPath::LineToElement.

bool Element::isMoveTo() const

Devuelve true si el elemento está desplazando la posición actual, en caso contrario devuelve false.

Véase también type y QPainterPath::MoveToElement.

Element::operator QPointF() const

Devuelve la posición del elemento.

Véase también x y y.

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

Devuelve true si este elemento no es igual a other; en caso contrario devuelve false.

Véase también operator==().

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

Devuelve true si este elemento es igual a other; en caso contrario devuelve false.

Véase también operator!=().

Documentación de variables miembro

QPainterPath::ElementType Element::type

Esta variable contiene el tipo de elemento

Véase también isCurveTo(), isLineTo() y isMoveTo().

qreal Element::x

Esta variable contiene la coordenada x de la posición del elemento.

Véase también operator QPointF().

qreal Element::y

Esta variable contiene la coordenada y de la posición del elemento.

Véase también 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.