FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IDrawingContextCore

    trait · ferroui-base · v0.5.0

    trait IDrawingContextCore
    

    The overridable part of a drawing context: the *Core members.

    Implemented by the platform drawing context and by the recording context. The arguments have been validated by DrawingContext.

    View source

    Members

    draw_line_core

    fn draw_line_core(self: &mut Self, pen: &Rc<dyn IPen>, p1: Point, p2: Point)
    

    Draws a line. The pen is visible.

    Source

    draw_geometry_core

    fn draw_geometry_core(self: &mut Self, brush: Option<&Rc<dyn IBrush>>, pen: Option<&Rc<dyn IPen>>, geometry: &Ref<Geometry>)
    

    Draws a geometry object. The default implementation draws its platform implementation, if it has one.

    Source

    draw_rectangle_core

    fn draw_rectangle_core(self: &mut Self, brush: Option<&Rc<dyn IBrush>>, pen: Option<&Rc<dyn IPen>>, rrect: RoundedRect, box_shadows: &BoxShadows)
    

    Draws a rectangle with the specified brush and pen.

    Source

    draw_ellipse_core

    fn draw_ellipse_core(self: &mut Self, brush: Option<&Rc<dyn IBrush>>, pen: Option<&Rc<dyn IPen>>, rect: Rect)
    

    Draws an ellipse with the specified brush and pen.

    Source

    custom

    fn custom(self: &mut Self, custom: &std::sync::Arc<dyn ICustomDrawOperation>)
    

    Draws a custom drawing operation.

    Source

    draw_glyph_run

    fn draw_glyph_run(self: &mut Self, foreground: Option<&Rc<dyn IBrush>>, glyph_run: &Rc<GlyphRun>)
    

    Draws a glyph run.

    Source

    draw_rectangle_acrylic_core

    fn draw_rectangle_acrylic_core(self: &mut Self, material: &dyn IExperimentalAcrylicMaterial, rect: RoundedRect)
    

    Draws a rectangle filled with an acrylic-like material.

    Upstream only the platform drawing context has this member and callers cast the context to reach it. Here it is a core member so that it is reachable through DrawingContext: the platform core uses the backend's acrylic support, every other core gets the rectangle filled with the fallback color of the material.

    Source

    push_clip_core

    fn push_clip_core(self: &mut Self, rect: Rect)
    

    Source

    push_rounded_clip_core

    fn push_rounded_clip_core(self: &mut Self, rect: RoundedRect)
    

    Source

    push_geometry_clip_core

    fn push_geometry_clip_core(self: &mut Self, clip: &Ref<Geometry>)
    

    Source

    push_opacity_core

    fn push_opacity_core(self: &mut Self, opacity: f64)
    

    Source

    push_opacity_mask_core

    fn push_opacity_mask_core(self: &mut Self, mask: &Rc<dyn IBrush>, bounds: Rect)
    

    Source

    push_transform_core

    fn push_transform_core(self: &mut Self, matrix: Matrix)
    

    Source

    push_render_options_core

    fn push_render_options_core(self: &mut Self, render_options: RenderOptions)
    

    Source

    push_text_options_core

    fn push_text_options_core(self: &mut Self, text_options: TextOptions)
    

    Source

    push_effect_core

    fn push_effect_core(self: &mut Self, effect: &Rc<dyn IEffect>, bounds: Rect)
    

    Source

    try_push_compositing_layer_core

    fn try_push_compositing_layer_core(self: &mut Self, _blend: BitmapBlendingMode, _opacity: f64, _bounds: Rect) -> bool
    

    Optional isolated compositing support. False leaves the core unchanged.

    Source

    pop_compositing_layer_core

    fn pop_compositing_layer_core(self: &mut Self)
    

    Source

    pop_clip_core

    fn pop_clip_core(self: &mut Self)
    

    Source

    pop_geometry_clip_core

    fn pop_geometry_clip_core(self: &mut Self)
    

    Source

    pop_opacity_core

    fn pop_opacity_core(self: &mut Self)
    

    Source

    pop_opacity_mask_core

    fn pop_opacity_mask_core(self: &mut Self)
    

    Source

    pop_transform_core

    fn pop_transform_core(self: &mut Self)
    

    Source

    pop_render_options_core

    fn pop_render_options_core(self: &mut Self)
    

    Source

    pop_text_options_core

    fn pop_text_options_core(self: &mut Self)
    

    Source

    pop_effect_core

    fn pop_effect_core(self: &mut Self)
    

    Source

    dispose_core

    fn dispose_core(self: &mut Self)
    

    Releases the core. Called once, after every pushed state has been popped, when an owned context is disposed.

    Source

    Trait implementations

    Availability

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