#[repr(C)]
pub struct Element { /* private fields */ }
Expand description

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

C++ class: QPainterPath::Element.

C++ documentation:

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

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.

Implementations§

source§

impl Element

source

pub unsafe fn copy_from( &self, other: impl CastInto<Ref<Element>> ) -> Ref<Element>

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

Calls C++ function: QPainterPath::Element& QPainterPath::Element::operator=(const QPainterPath::Element& other).

C++ documentation:

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

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.

source

pub unsafe fn is_curve_to(&self) -> bool

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

Calls C++ function: bool QPainterPath::Element::isCurveTo() const.

C++ documentation:

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

See also type and QPainterPath::CurveToElement.

source

pub unsafe fn is_line_to(&self) -> bool

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

Calls C++ function: bool QPainterPath::Element::isLineTo() const.

C++ documentation:

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

See also type and QPainterPath::LineToElement.

source

pub unsafe fn is_move_to(&self) -> bool

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

Calls C++ function: bool QPainterPath::Element::isMoveTo() const.

C++ documentation:

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

See also type and QPainterPath::MoveToElement.

source

pub unsafe fn new() -> CppBox<Element>

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

Calls C++ function: [constructor] void QPainterPath::Element::Element().

C++ documentation:

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

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.

source

pub unsafe fn new_copy(other: impl CastInto<Ref<Element>>) -> CppBox<Element>

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

Calls C++ function: [constructor] void QPainterPath::Element::Element(const QPainterPath::Element& other).

C++ documentation:

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

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.

source

pub unsafe fn set_type(&self, value: ElementType)

Sets the value of the type field.

source

pub unsafe fn set_x(&self, value: c_double)

Sets the value of the x field.

source

pub unsafe fn set_y(&self, value: c_double)

Sets the value of the y field.

source

pub unsafe fn to_q_point_f(&self) -> CppBox<QPointF>

Returns the element's position.

Calls C++ function: QPointF QPainterPath::Element::operator QPointF() const.

C++ documentation:

Returns the element’s position.

See also x and y.

source

pub unsafe fn type_(&self) -> ElementType

Returns the value of the type field.

source

pub unsafe fn x(&self) -> c_double

Returns the value of the x field.

source

pub unsafe fn y(&self) -> c_double

Returns the value of the y field.

Trait Implementations§

source§

impl CppDeletable for Element

source§

unsafe fn delete(&self)

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

Calls C++ function: [destructor] void QPainterPath::Element::~Element().

C++ documentation:

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

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.

source§

impl PartialEq<Ref<Element>> for Element

source§

fn eq(&self, e: &Ref<Element>) -> bool

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

Calls C++ function: bool QPainterPath::Element::operator==(const QPainterPath::Element& e) const.

C++ documentation:

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

This function was introduced in Qt 4.2.

See also operator!=().

1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.