FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ICustomDrawOperation

    trait · ferroui-base · v0.5.0

    trait ICustomDrawOperation: Send + Sync + 'static
    

    Represents a custom draw operation in the low-level scene graph.

    An operation is created on the UI thread and rendered on the render thread, so it is Send + Sync: what it draws with is captured by value or in thread-safe form.

    View source

    Members

    bounds

    fn bounds(self: &Self) -> Rect
    

    The bounds of the visible content in the node in global coordinates.

    Source

    hit_test

    fn hit_test(self: &Self, p: Point) -> bool
    

    Hit tests the node against a point, in global coordinates.

    The implementation is responsible for checking transforms and geometry clips if necessary.

    Source

    hit_test_geometry

    fn hit_test_geometry(self: &Self, _geometry: &Ref<Geometry>) -> IntersectionResult
    

    Hit tests the node against a geometry.

    Source

    render

    fn render(self: &Self, context: &mut ImmediateDrawingContext<'_>)
    

    Renders the node to a drawing context.

    Source

    equals

    fn equals(self: &Self, other: &dyn ICustomDrawOperation) -> bool
    

    Value equality between operations (C# IEquatable<ICustomDrawOperation>).

    Source

    dispose

    fn dispose(self: &Self)
    

    Releases the operation's resources.

    Source

    Availability

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