# Affine

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-designer-tools/struct-affine/

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

```rust
struct Affine
```

Row-vector affine transform: x'=x*m11+y*m21+dx, y'=x*m12+y*m22+dy.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L114)

## Members

- [`m11`](#struct_field-m11)
- [`m12`](#struct_field-m12)
- [`m21`](#struct_field-m21)
- [`m22`](#struct_field-m22)
- [`dx`](#struct_field-dx)
- [`dy`](#struct_field-dy)
- [`IDENTITY`](#assoc_const-identity)
- [`validate`](#function-validate)
- [`transform`](#function-transform)
- [`inverse`](#function-inverse)
- [`then`](#function-then)
- [`rotation`](#function-rotation)
- [`scale`](#function-scale)
- [`bounds`](#function-bounds)
- [`to_xaml`](#function-to_xaml)

<a id="struct_field-m11"></a>

### m11

```rust
m11: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L115)

<a id="struct_field-m12"></a>

### m12

```rust
m12: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L116)

<a id="struct_field-m21"></a>

### m21

```rust
m21: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L117)

<a id="struct_field-m22"></a>

### m22

```rust
m22: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L118)

<a id="struct_field-dx"></a>

### dx

```rust
dx: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L119)

<a id="struct_field-dy"></a>

### dy

```rust
dy: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L120)

<a id="assoc_const-identity"></a>

### IDENTITY

```rust
const IDENTITY: Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L128)

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

### validate

```rust
fn validate(self: Self) -> Result<()>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L136)

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

### transform

```rust
fn transform(self: Self, point: Point) -> Result<Point>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L144)

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

### inverse

```rust
fn inverse(self: Self) -> Result<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L154)

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

### then

```rust
fn then(self: Self, next: Self) -> Result<Self>
```

Apply self, then next.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L170)

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

### rotation

```rust
fn rotation(degrees: f64, pivot: Point) -> Result<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L184)

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

### scale

```rust
fn scale(x: f64, y: f64, pivot: Point) -> Result<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L199)

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

### bounds

```rust
fn bounds(self: Self, rect: Rect) -> Result<Rect>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L212)

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

### to_xaml

```rust
fn to_xaml(self: Self) -> Result<String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Tools/geometry.rs#L229)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `DeserializeOwned`
- `Clone`
- `Copy`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Serialize`
- `Deserialize<'de>`
- `Default`

## Availability

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