ImmutableTileBrush
struct · ferroui-base · v0.5.0
struct ImmutableTileBrush
The data shared by all immutable tile brushes.
Members
newfrom_brushalignment_xalignment_ydestination_rectopacitytransformtransform_originsource_rectstretchtile_moderelative_transform
new
fn new(alignment_x: AlignmentX, alignment_y: AlignmentY, destination_rect: RelativeRect, opacity: f64, transform: Option<Rc<ImmutableTransform>>, transform_origin: RelativePoint, source_rect: RelativeRect, stretch: Stretch, tile_mode: TileMode, relative_transform: Option<Rc<ImmutableTransform>>) -> Self
Creates the tile brush data.
from_brush
fn from_brush(source: &dyn ITileBrush) -> Self
Creates an immutable copy of the tile brush data of source.
alignment_x
fn alignment_x(self: &Self) -> AlignmentX
The horizontal alignment of a tile in the destination.
alignment_y
fn alignment_y(self: &Self) -> AlignmentY
The vertical alignment of a tile in the destination.
destination_rect
fn destination_rect(self: &Self) -> RelativeRect
The rectangle on the destination in which to paint a tile.
opacity
fn opacity(self: &Self) -> f64
The opacity of the brush.
transform
fn transform(self: &Self) -> Option<Rc<dyn ITransform>>
The transform of the brush.
transform_origin
fn transform_origin(self: &Self) -> RelativePoint
The transform origin of the brush.
source_rect
fn source_rect(self: &Self) -> RelativeRect
The rectangle of the source image that will be displayed.
stretch
fn stretch(self: &Self) -> Stretch
A value controlling how the source rectangle will be stretched to fill the destination rect.
tile_mode
fn tile_mode(self: &Self) -> TileMode
The brush's tile mode.
relative_transform
fn relative_transform(self: &Self) -> Option<Rc<dyn ITransform>>
The transform of the brush, relative to the bounds of the painted area.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherClone
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.