# ITileBrush

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/trait-itilebrush/

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

```rust
trait ITileBrush: IBrush
```

A brush which displays a repeating image.

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

## Members

- [`alignment_x`](#function-alignment_x)
- [`alignment_y`](#function-alignment_y)
- [`destination_rect`](#function-destination_rect)
- [`source_rect`](#function-source_rect)
- [`stretch`](#function-stretch)
- [`tile_mode`](#function-tile_mode)

<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/i_tile_brush.rs#L8)

<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/i_tile_brush.rs#L11)

<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/i_tile_brush.rs#L14)

<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/i_tile_brush.rs#L17)

<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/i_tile_brush.rs#L21)

<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/i_tile_brush.rs#L24)

## Trait implementations

- [`ITileBrush`](/docs/0.5.0/api/ferroui-base/media/trait-itilebrush/)

## Availability

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