[−][src]Struct qt_gui::q_painter_path::Element
The QPainterPath::Element class specifies the position and type of a subpath.
C++ class: QPainterPath::Element
.
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]
&mut self,
other: impl CastInto<Ref<Element>>
) -> MutRef<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)
.
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
.
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
.
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
.
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()
.
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)
.
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
.
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()
.
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
.
Returns true
if this element is equal to other; otherwise returns false
.
This function was introduced in Qt 4.2.
See also operator!=().
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
unsafe fn static_upcast_mut(ptr: MutPtr<T>) -> MutPtr<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,