Sur cette page

QPainterPath::Element Class

class QPainterPath::Element

La classe QPainterPath::Element spécifie la position et le type d'un sous-chemin. Plus d'informations...

Fonctions publiques

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 publiques

QPainterPath::ElementType type
qreal x
qreal y

Description détaillée

Une fois qu'un objet QPainterPath est construit, des sous-chemins tels que des lignes et des courbes peuvent être ajoutés au chemin (en créant des composants QPainterPath::LineToElement et QPainterPath::CurveToElement ).

Les lignes et les courbes s'étendent de la position currentPosition() à la position passée en argument. La fonction currentPosition() de l'objet QPainterPath correspond toujours à la position finale du dernier sous-chemin qui a été ajouté (ou au point de départ initial). La fonction moveTo() peut être utilisée pour déplacer l'objet currentPosition() sans ajouter de ligne ou de courbe, créant ainsi un composant QPainterPath::MoveToElement.

Voir également QPainterPath.

Documentation des fonctions membres

bool Element::isCurveTo() const

Renvoie true si l'élément est une courbe, sinon renvoie false.

Voir aussi type et QPainterPath::CurveToElement.

bool Element::isLineTo() const

Renvoie true si l'élément est une ligne, sinon renvoie false.

Voir aussi type et QPainterPath::LineToElement.

bool Element::isMoveTo() const

Renvoie true si l'élément se déplace à la position actuelle, sinon renvoie false.

Voir également type et QPainterPath::MoveToElement.

Element::operator QPointF() const

Renvoie la position de l'élément.

Voir aussi x et y.

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

Renvoie true si cet élément n'est pas égal à other; sinon, renvoie false.

Voir aussi operator==().

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

Renvoie true si cet élément est égal à other; sinon, renvoie false.

Voir également operator!=().

Documentation sur les variables membres

QPainterPath::ElementType Element::type

Cette variable contient le type d'élément

Voir aussi isCurveTo(), isLineTo() et isMoveTo().

qreal Element::x

Cette variable contient la coordonnée x de la position de l'élément.

Voir aussi operator QPointF().

qreal Element::y

Cette variable contient la coordonnée y de la position de l'élément.

Voir aussi 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.