FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Shape

    struct · ferroui-controls · v0.5.0

    struct Shape
    

    Provides a base class for shape elements, such as Ellipse, Polygon and Rectangle.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<Shape>
    

    Returns a strong reference to this object.

    Source

    create_defining_geometry

    fn create_defining_geometry(self: &Self) -> Option<Ref<Geometry>>
    

    Creates the shape's defining geometry.

    Source

    on_geometry_changed

    fn on_geometry_changed(self: &Self)
    

    Called when the underlying Geometry changed.

    Source

    fill_property

    fn fill_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
    

    Defines the Fill property.

    Source

    stretch_property

    fn stretch_property() -> &'static StyledProperty<Stretch>
    

    Defines the Stretch property.

    Source

    stroke_property

    fn stroke_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
    

    Defines the Stroke property.

    Source

    stroke_dash_array_property

    fn stroke_dash_array_property() -> &'static StyledProperty<Option<MediaCollection<f64>>>
    

    Defines the StrokeDashArray property.

    Source

    stroke_dash_offset_property

    fn stroke_dash_offset_property() -> &'static StyledProperty<f64>
    

    Defines the StrokeDashOffset property.

    Source

    stroke_thickness_property

    fn stroke_thickness_property() -> &'static StyledProperty<f64>
    

    Defines the StrokeThickness property.

    Source

    stroke_line_cap_property

    fn stroke_line_cap_property() -> &'static StyledProperty<PenLineCap>
    

    Defines the StrokeLineCap property.

    Source

    stroke_join_property

    fn stroke_join_property() -> &'static StyledProperty<PenLineJoin>
    

    Defines the StrokeJoin property.

    Source

    stroke_miter_limit_property

    fn stroke_miter_limit_property() -> &'static StyledProperty<f64>
    

    Defines the StrokeMiterLimit property.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    get_alpha_mask

    fn get_alpha_mask(self: &Self) -> Option<Rc<CompositionBrush>>
    

    Shape.GetAlphaMask: a composition brush that shows the alpha of the shape (its fill and its stroke), for the Mask of a DropShadow or another composition effect. The same brush is returned on every call; it follows the shape as the shape is drawn again (its geometry, stroke, size and visibility). None when no compositor is available.

    See AlphaMask for how the mask is drawn.

    Source

    defining_geometry

    fn defining_geometry(self: &Self) -> Option<Ref<Geometry>>
    

    Gets a value that represents the Geometry of the shape.

    Source

    rendered_geometry

    fn rendered_geometry(self: &Self) -> Option<Ref<Geometry>>
    

    Gets a value that represents the final rendered Geometry of the shape.

    Source

    fill

    fn fill(self: &Self) -> Option<Rc<dyn IBrush>>
    

    Gets the brush that specifies how the shape's interior is painted.

    Source

    set_fill

    fn set_fill(self: &Self, value: Option<Rc<dyn IBrush>>)
    

    Sets the brush that specifies how the shape's interior is painted.

    Source

    stretch

    fn stretch(self: &Self) -> Stretch
    

    Gets a Stretch value that describes how the shape fills its allocated space.

    Source

    set_stretch

    fn set_stretch(self: &Self, value: Stretch)
    

    Sets a Stretch value that describes how the shape fills its allocated space.

    Source

    stroke

    fn stroke(self: &Self) -> Option<Rc<dyn IBrush>>
    

    Gets the brush that specifies how the shape's outline is painted.

    Source

    set_stroke

    fn set_stroke(self: &Self, value: Option<Rc<dyn IBrush>>)
    

    Sets the brush that specifies how the shape's outline is painted.

    Source

    stroke_dash_array

    fn stroke_dash_array(self: &Self) -> Option<MediaCollection<f64>>
    

    Gets a collection of values that indicate the pattern of dashes and gaps that is used to outline shapes.

    Source

    set_stroke_dash_array

    fn set_stroke_dash_array(self: &Self, value: Option<MediaCollection<f64>>)
    

    Sets a collection of values that indicate the pattern of dashes and gaps that is used to outline shapes.

    Source

    stroke_dash_offset

    fn stroke_dash_offset(self: &Self) -> f64
    

    Gets a value that specifies the distance within the dash pattern where a dash begins.

    Source

    set_stroke_dash_offset

    fn set_stroke_dash_offset(self: &Self, value: f64)
    

    Sets a value that specifies the distance within the dash pattern where a dash begins.

    Source

    stroke_thickness

    fn stroke_thickness(self: &Self) -> f64
    

    Gets the width of the shape outline.

    Source

    set_stroke_thickness

    fn set_stroke_thickness(self: &Self, value: f64)
    

    Sets the width of the shape outline.

    Source

    stroke_line_cap

    fn stroke_line_cap(self: &Self) -> PenLineCap
    

    Gets a PenLineCap value that describes the shape at the ends of a line.

    Source

    set_stroke_line_cap

    fn set_stroke_line_cap(self: &Self, value: PenLineCap)
    

    Sets a PenLineCap value that describes the shape at the ends of a line.

    Source

    stroke_join

    fn stroke_join(self: &Self) -> PenLineJoin
    

    Gets a PenLineJoin value that specifies the type of join that is used at the vertices of a shape.

    Source

    set_stroke_join

    fn set_stroke_join(self: &Self, value: PenLineJoin)
    

    Sets a PenLineJoin value that specifies the type of join that is used at the vertices of a shape.

    Source

    stroke_miter_limit

    fn stroke_miter_limit(self: &Self) -> f64
    

    Gets the limit on the ratio of the miter length to half the StrokeThickness of the pen.

    Source

    set_stroke_miter_limit

    fn set_stroke_miter_limit(self: &Self, value: f64)
    

    Sets the limit on the ratio of the miter length to half the StrokeThickness of the pen.

    Source

    affects_geometry

    fn affects_geometry<T: ObjectType + Upcast<Shape>>(properties: &[&'static FerroProperty])
    

    Marks a property as affecting the shape's geometry.

    After a call to this method in a control's class initialisation, any change to the property on an object of class T causes invalidate_geometry to be called on the element.

    Source

    invalidate_geometry

    fn invalidate_geometry(self: &Self)
    

    Invalidates the geometry of this shape.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.