# TextBounds

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

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

```rust
struct TextBounds
```

The bounding rectangle of a range of characters.

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

## Members

- [`rectangle`](#function-rectangle)
- [`flow_direction`](#function-flow_direction)
- [`text_run_bounds`](#function-text_run_bounds)

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

### rectangle

```rust
fn rectangle(self: &Self) -> Rect
```

Bounds rectangle.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/text_formatting/text_bounds.rs#L19)

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

### flow_direction

```rust
fn flow_direction(self: &Self) -> FlowDirection
```

Text flow direction inside the bounding rectangle.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/text_formatting/text_bounds.rs#L28)

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

### text_run_bounds

```rust
fn text_run_bounds(self: &Self) -> &[TextRunBounds]
```

Get a list of run bounding rectangles.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/text_formatting/text_bounds.rs#L33)

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