IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

Element Class

The QPainterPath::Element class specifies the position and type of a subpath.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

Element Class▲

  • Header: Element

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Gui)

    target_link_libraries(mytarget PRIVATE Qt6::Gui)

  • qmake: QT += gui

Detailed Description▲

Once a QPainterPath object is constructed, subpaths like lines and curves can be added to the path (creating QPainterPath::LineToElement and QPainterPath::CurveToElement components).

The lines and curves stretch from the currentPosition() to the position passed as argument. The currentPosition() of the QPainterPath object is always the end position of the last subpath that was added (or the initial start point). The moveTo() function can be used to move the currentPosition() without adding a line or curve, creating a QPainterPath::MoveToElement component.

See Also▲

See also QPainterPath

Member Function Documentation▲

 

bool Element::isCurveTo() const▲

Returns true if the element is a curve, otherwise returns false.

See Also▲

bool Element::isLineTo() const▲

Returns true if the element is a line, otherwise returns false.

See Also▲

bool Element::isMoveTo() const▲

Returns true if the element is moving the current position, otherwise returns false.

See Also▲

QPointF Element::operator QPointF() const▲

Returns the element's position.

See Also▲

See also x, y

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

Returns true if this element is not equal to other; otherwise returns false.

See Also▲

See also operator==()

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

Returns true if this element is equal to other; otherwise returns false.

See Also▲

See also operator!=()

Member Variable Documentation▲

 

QPainterPath::ElementType Element::type▲

This variable holds the type of element

See Also▲

See also isCurveTo(), isLineTo(), isMoveTo()

qreal Element::x▲

This variable holds the x coordinate of the element's position.

See Also▲

qreal Element::y▲

This variable holds the y coordinate of the element's position.

See Also▲

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+