FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    DragVisualGhost

    struct · ferroui-designer · v0.5.0

    struct DragVisualGhost
    

    A native drag snapshot. Capture after the move threshold and drop it when the gesture finishes or cancels; no accepted control property is changed.

    Ancestor affine transforms are preserved. A source's own render transform or mirror is currently declined because the native bitmap renderer applies it inside its local clipping rectangle. Those controls use the geometric ghost.

    View source

    Members

    capture

    fn capture(visual: &Ref<Visual>, to_artboard: Matrix, raster_scale: f64) -> Option<Self>
    

    Capture a laid-out control once. The longest bitmap edge is bounded to 2048 pixels, retaining aspect ratio. Hosts should also bound the sum of pixel_count() across a large multiselection.

    Source

    pixel_count

    fn pixel_count(self: &Self) -> usize
    

    Number of cached RGBA pixels, for a host-owned aggregate gesture budget.

    Source

    render

    fn render(self: &Self, context: &mut DrawingContext<'_>, adjustment: Matrix, opacity: f64)
    

    Render with an artboard-space adjustment, such as the current translation. The cached content does not refresh or mutate runtime/source while dragging.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Same
    • Drop

    Availability

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