Nesta página

QPainterPath::Element Class

class QPainterPath::Element

A classe ` QPainterPath::Element ` especifica a posição e o tipo de um subcaminho. Mais...

Funções 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

Variáveis públicas

QPainterPath::ElementType type
qreal x
qreal y

Descrição detalhada

Depois que um objeto ` QPainterPath ` é criado, subcaminhos como linhas e curvas podem ser adicionados ao caminho (criando componentes ` QPainterPath::LineToElement ` e ` QPainterPath::CurveToElement `).

As linhas e curvas se estendem do objeto ` currentPosition()` até a posição passada como argumento. O ` currentPosition()` do objeto ` QPainterPath ` é sempre a posição final do último subcaminho adicionado (ou o ponto inicial). A função ` moveTo()` pode ser usada para mover o ` currentPosition()` sem adicionar uma linha ou curva, criando um componente ` QPainterPath::MoveToElement `.

Veja também QPainterPath.

Documentação da função membro

bool Element::isCurveTo() const

Retorna true se o elemento for uma curva; caso contrário, retorna false.

Veja também type e QPainterPath::CurveToElement.

bool Element::isLineTo() const

Retorna ` true ` se o elemento for uma linha; caso contrário, retorna ` false`.

Veja também type e QPainterPath::LineToElement.

bool Element::isMoveTo() const

Retorna ` true ` se o elemento estiver se movendo na posição atual; caso contrário, retorna ` false`.

Veja também type e QPainterPath::MoveToElement.

Element::operator QPointF() const

Retorna a posição do elemento.

Veja também x e y.

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

Retorna ` true ` se este elemento não for igual a ` other`; caso contrário, retorna ` false`.

Veja também operator==().

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

Retorna ` true ` se este elemento for igual a ` other`; caso contrário, retorna ` false`.

Veja também operator!=().

Documentação das variáveis de membro

QPainterPath::ElementType Element::type

Essa variável contém o tipo do elemento

Veja também isCurveTo(), isLineTo() e isMoveTo().

qreal Element::x

Essa variável contém a coordenada x da posição do elemento.

Veja também operator QPointF().

qreal Element::y

Essa variável contém a coordenada y da posição do elemento.

Veja também 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.