# PixelateEffect

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/effects/library/struct-pixelateeffect/

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

```rust
struct PixelateEffect
```

Pixelates the content (Effector's `PixelateEffect`): a grid of square
cells of `cell-size` device independent pixels from the top left corner of
the area, each the colour of the pixel at its centre. `cell-size` is
clamped to 0..64; a cell is at least one device pixel, so 0 (the neutral
value) leaves the content unchanged.

`pixelate(cell-size=10)`. A content-sampling shader effect with a sample
radius of 64 (the largest cell).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/library/shaders.rs#L78)

## Members

- [`cell_size`](#struct_field-cell_size)
- [`MAXIMUM_CELL_SIZE`](#assoc_const-maximum_cell_size)

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

### cell_size

```rust
cell_size: f64
```

The side of a cell, in device independent pixels (default 10).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/library/shaders.rs#L80)

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

### MAXIMUM_CELL_SIZE

```rust
const MAXIMUM_CELL_SIZE: f64
```

The largest side of a cell.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/library/shaders.rs#L91)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`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`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Default`
- [`CustomEffect`](/docs/0.5.0/api/ferroui-base/media/effects/trait-customeffect/)

## Availability

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