FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ImmutableImageBrush

    struct · ferroui-base · v0.5.0

    struct ImmutableImageBrush
    

    Paints an area with an image.

    View source

    Members

    new

    fn new(source: Option<Rc<Bitmap>>, alignment_x: AlignmentX, alignment_y: AlignmentY, destination_rect: Option<RelativeRect>, opacity: f64, transform: Option<Rc<ImmutableTransform>>, transform_origin: RelativePoint, source_rect: Option<RelativeRect>, stretch: Stretch, tile_mode: TileMode, relative_transform: Option<Rc<ImmutableTransform>>) -> Self
    

    Creates a brush. destination_rect and source_rect default to the whole area.

    Source

    from_bitmap

    fn from_bitmap(source: Option<Rc<Bitmap>>) -> Self
    

    Creates a brush drawing source with default values for everything else: centered, uniformly stretched, not tiled and fully opaque.

    Source

    from_brush

    fn from_brush(source: &dyn IImageBrush) -> Self
    

    Creates an immutable copy of source.

    Source

    source

    fn source(self: &Self) -> Option<Rc<dyn IImageBrushSource>>
    

    The image to draw.

    Source

    Trait implementations

    Availability

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