# GridShaderEffect

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

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

```rust
struct GridShaderEffect
```

Grid lines over the content (Effector's `GridShaderEffect`): lines along
the top and the left of each cell of `cell-size` device independent pixels
(clamped to 8..64) from the top left corner of the area, 6 percent of the
cell wide, in the colour at the opacity `strength` (clamped to 0..1) times
the alpha of the content, drawn source over the content.

`grid(cell-size=22, strength=0.22, color=#3FC3FF)`. An overlay shader
effect masked by the content; a strength of 0 (the neutral value) leaves
the content unchanged. `ReactiveGridShaderEffect`
is the grid that follows the pointer.

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

## Members

- [`cell_size`](#struct_field-cell_size)
- [`strength`](#struct_field-strength)
- [`color`](#struct_field-color)
- [`LINE_WIDTH`](#assoc_const-line_width)

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

### cell_size

```rust
cell_size: f64
```

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

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

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

### strength

```rust
strength: f64
```

The opacity of the lines, 0 to 1 (default 0.22).

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

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

### color

```rust
color: crate::media::Color
```

The colour of the lines (default #3FC3FF).

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

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

### LINE_WIDTH

```rust
const LINE_WIDTH: f32
```

The width of a line, a fraction of the side of a cell.

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

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