[][src]Struct qt_gui::q_painter_path::Element

#[repr(C)]
pub struct Element { /* fields omitted */ }

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.

Methods

impl Element[src]

pub unsafe fn copy_from(
    &mut self,
    other: impl CastInto<Ref<Element>>
) -> MutRef<Element>
[src]

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.

pub unsafe fn is_curve_to(&self) -> bool[src]

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.

pub unsafe fn is_line_to(&self) -> bool[src]

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.

pub unsafe fn is_move_to(&self) -> bool[src]

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.

pub unsafe fn new() -> CppBox<Element>[src]

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.

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

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.

pub unsafe fn set_type(&mut self, value: ElementType)[src]

Sets the value of the type field.

pub unsafe fn set_x(&mut self, value: c_double)[src]

Sets the value of the x field.

pub unsafe fn set_y(&mut self, value: c_double)[src]

Sets the value of the y field.

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

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.

pub unsafe fn type_(&self) -> ElementType[src]

Returns the value of the type field.

pub unsafe fn x(&self) -> c_double[src]

Returns the value of the x field.

pub unsafe fn y(&self) -> c_double[src]

Returns the value of the y field.

Trait Implementations

impl CppDeletable for Element[src]

unsafe fn delete(&mut self)[src]

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.

impl PartialEq<Ref<Element>> for Element[src]

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

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!=().

Auto Trait Implementations

impl RefUnwindSafe for Element

impl Send for Element

impl Sync for Element

impl Unpin for Element

impl UnwindSafe for Element

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.