FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    RenderTargetBitmap

    struct · ferroui-base · v0.5.0

    struct RenderTargetBitmap
    

    A bitmap that holds the rendering of a visual.

    View source

    Members

    new

    fn new(pixel_size: PixelSize) -> RenderTargetBitmap
    

    Creates a bitmap of the given size, in pixels, at 96 DPI.

    Source

    with_dpi

    fn with_dpi(pixel_size: PixelSize, dpi: Vector) -> RenderTargetBitmap
    

    Creates a bitmap of the given size, in pixels, and DPI.

    Source

    render

    fn render(self: &Self, visual: &Ref<Visual>)
    

    Renders a visual to the bitmap.

    Source

    create_drawing_context

    fn create_drawing_context(self: &Self) -> DrawingContext<'static>
    

    Creates a drawing context that draws into the bitmap, after clearing the bitmap. Disposing (or dropping) the context finishes the drawing.

    Source

    create_drawing_context_with_clear

    fn create_drawing_context_with_clear(self: &Self, clear: bool) -> DrawingContext<'static>
    

    Creates a drawing context that draws into the bitmap, clearing the bitmap first when clear is set.

    Source

    dispose

    fn dispose(self: &Self)
    

    Releases the bitmap's references to the platform bitmap.

    Source

    Trait implementations

    Availability

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