FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    BackgroundSizing

    enum · ferroui-base · v0.5.0

    enum BackgroundSizing
    

    Defines how a background is drawn relative to its border.

    View source

    Members

    InnerBorderEdge

    InnerBorderEdge = 0
    

    The background is drawn up to the inside edge of the border.

    The background will never be drawn under the border itself and will not be visible underneath the border regardless of border transparency.

    Source

    OuterBorderEdge

    OuterBorderEdge = 1
    

    The background is drawn completely to the outside edge of the border.

    The background will be visible underneath the border if the border has transparency.

    Source

    CenterBorder

    CenterBorder = 2
    

    The background is drawn to the midpoint (center) of the border.

    The background will be visible underneath half of the border if the border has transparency. For this reason it is not recommended to use CenterBorder if transparency is involved.

    This value does not exist in other XAML frameworks and only exists for backwards compatibility with legacy code. Before BackgroundSizing was added, rendering always used this value (Skia's default).

    Source

    Trait implementations

    Availability

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