pub struct ImmutableTileBrush { /* private fields */ }Expand description
The data shared by all immutable tile brushes.
Implementations§
Source§impl ImmutableTileBrush
impl ImmutableTileBrush
Sourcepub 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
pub 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.
Sourcepub fn from_brush(source: &dyn ITileBrush) -> Self
pub fn from_brush(source: &dyn ITileBrush) -> Self
Creates an immutable copy of the tile brush data of source.
Sourcepub fn alignment_x(&self) -> AlignmentX
pub fn alignment_x(&self) -> AlignmentX
The horizontal alignment of a tile in the destination.
Sourcepub fn alignment_y(&self) -> AlignmentY
pub fn alignment_y(&self) -> AlignmentY
The vertical alignment of a tile in the destination.
Sourcepub fn destination_rect(&self) -> RelativeRect
pub fn destination_rect(&self) -> RelativeRect
The rectangle on the destination in which to paint a tile.
Sourcepub fn transform(&self) -> Option<Rc<dyn ITransform>>
pub fn transform(&self) -> Option<Rc<dyn ITransform>>
The transform of the brush.
Sourcepub fn transform_origin(&self) -> RelativePoint
pub fn transform_origin(&self) -> RelativePoint
The transform origin of the brush.
Sourcepub fn source_rect(&self) -> RelativeRect
pub fn source_rect(&self) -> RelativeRect
The rectangle of the source image that will be displayed.
Sourcepub fn stretch(&self) -> Stretch
pub fn stretch(&self) -> Stretch
A value controlling how the source rectangle will be stretched to fill the destination rect.
Sourcepub fn relative_transform(&self) -> Option<Rc<dyn ITransform>>
pub fn relative_transform(&self) -> Option<Rc<dyn ITransform>>
The transform of the brush, relative to the bounds of the painted area.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ImmutableTileBrush
impl !RefUnwindSafe for ImmutableTileBrush
impl !Send for ImmutableTileBrush
impl !Sync for ImmutableTileBrush
impl !UnwindSafe for ImmutableTileBrush
impl Unpin for ImmutableTileBrush
impl UnsafeUnpin for ImmutableTileBrush
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more