# ImmutableTileBrush

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/immutable/struct-immutabletilebrush/

**struct** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
struct ImmutableTileBrush
```

The data shared by all immutable tile brushes.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_tile_brush.rs#L8)

## Members

- [`new`](#function-new)
- [`from_brush`](#function-from_brush)
- [`alignment_x`](#function-alignment_x)
- [`alignment_y`](#function-alignment_y)
- [`destination_rect`](#function-destination_rect)
- [`opacity`](#function-opacity)
- [`transform`](#function-transform)
- [`transform_origin`](#function-transform_origin)
- [`source_rect`](#function-source_rect)
- [`stretch`](#function-stretch)
- [`tile_mode`](#function-tile_mode)
- [`relative_transform`](#function-relative_transform)

<a id="function-new"></a>

### new

```rust
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.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_tile_brush.rs#L26)

<a id="function-from_brush"></a>

### from_brush

```rust
fn from_brush(source: &dyn ITileBrush) -> Self
```

Creates an immutable copy of the tile brush data of `source`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_tile_brush.rs#L54)

<a id="function-alignment_x"></a>

### alignment_x

```rust
fn alignment_x(self: &Self) -> AlignmentX
```

The horizontal alignment of a tile in the destination.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_tile_brush.rs#L71)

<a id="function-alignment_y"></a>

### alignment_y

```rust
fn alignment_y(self: &Self) -> AlignmentY
```

The vertical alignment of a tile in the destination.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_tile_brush.rs#L77)

<a id="function-destination_rect"></a>

### destination_rect

```rust
fn destination_rect(self: &Self) -> RelativeRect
```

The rectangle on the destination in which to paint a tile.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_tile_brush.rs#L83)

<a id="function-opacity"></a>

### opacity

```rust
fn opacity(self: &Self) -> f64
```

The opacity of the brush.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_tile_brush.rs#L89)

<a id="function-transform"></a>

### transform

```rust
fn transform(self: &Self) -> Option<Rc<dyn ITransform>>
```

The transform of the brush.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_tile_brush.rs#L95)

<a id="function-transform_origin"></a>

### transform_origin

```rust
fn transform_origin(self: &Self) -> RelativePoint
```

The transform origin of the brush.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_tile_brush.rs#L101)

<a id="function-source_rect"></a>

### source_rect

```rust
fn source_rect(self: &Self) -> RelativeRect
```

The rectangle of the source image that will be displayed.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_tile_brush.rs#L107)

<a id="function-stretch"></a>

### stretch

```rust
fn stretch(self: &Self) -> Stretch
```

A value controlling how the source rectangle will be stretched to
fill the destination rect.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_tile_brush.rs#L114)

<a id="function-tile_mode"></a>

### tile_mode

```rust
fn tile_mode(self: &Self) -> TileMode
```

The brush's tile mode.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_tile_brush.rs#L120)

<a id="function-relative_transform"></a>

### relative_transform

```rust
fn relative_transform(self: &Self) -> Option<Rc<dyn ITransform>>
```

The transform of the brush, relative to the bounds of the painted
area.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/immutable/immutable_tile_brush.rs#L127)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ErasedDestructor`
- `IntoEither`
- `Clone`

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
