Struct qt_gui::q_painter_path::Element
source · #[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
.
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
impl Element
sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<Element>>
) -> Ref<Element>
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)
.
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.
sourcepub unsafe fn is_curve_to(&self) -> bool
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
.
Returns true
if the element is a curve, otherwise returns false
.
See also type and QPainterPath::CurveToElement.
sourcepub unsafe fn is_line_to(&self) -> bool
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
.
Returns true
if the element is a line, otherwise returns false
.
See also type and QPainterPath::LineToElement.
sourcepub unsafe fn is_move_to(&self) -> bool
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
.
Returns true
if the element is moving the current position, otherwise returns false
.
See also type and QPainterPath::MoveToElement.
sourcepub unsafe fn new() -> CppBox<Element>
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()
.
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.
sourcepub unsafe fn new_copy(other: impl CastInto<Ref<Element>>) -> CppBox<Element>
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)
.
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.
sourcepub unsafe fn set_type(&self, value: ElementType)
pub unsafe fn set_type(&self, value: ElementType)
Sets the value of the type
field.
sourcepub unsafe fn to_q_point_f(&self) -> CppBox<QPointF>
pub unsafe fn to_q_point_f(&self) -> CppBox<QPointF>
Returns the element's position.
Calls C++ function: QPointF QPainterPath::Element::operator QPointF() const
.
sourcepub unsafe fn type_(&self) -> ElementType
pub unsafe fn type_(&self) -> ElementType
Returns the value of the type
field.
Trait Implementations§
source§impl CppDeletable for Element
impl CppDeletable for Element
source§unsafe fn delete(&self)
unsafe fn delete(&self)
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.
source§impl PartialEq<Ref<Element>> for Element
impl PartialEq<Ref<Element>> for Element
source§fn eq(&self, e: &Ref<Element>) -> bool
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
.
Returns true
if this element is equal to other; otherwise returns false
.
This function was introduced in Qt 4.2.
See also operator!=().