# ICustomDrawOperation

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/rendering/scene_graph/trait-icustomdrawoperation/

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

```rust
trait ICustomDrawOperation: Send + Sync + 'static
```

Represents a custom draw operation in the low-level scene graph.

An operation is created on the UI thread and rendered on the render
thread, so it is `Send + Sync`: what it draws with is captured by value
or in thread-safe form.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/scene_graph/custom_draw_operation.rs#L9)

## Members

- [`bounds`](#function-bounds)
- [`hit_test`](#function-hit_test)
- [`hit_test_geometry`](#function-hit_test_geometry)
- [`render`](#function-render)
- [`equals`](#function-equals)
- [`dispose`](#function-dispose)

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

### bounds

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

The bounds of the visible content in the node in global coordinates.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/scene_graph/custom_draw_operation.rs#L11)

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

### hit_test

```rust
fn hit_test(self: &Self, p: Point) -> bool
```

Hit tests the node against a point, in global coordinates.

The implementation is responsible for checking transforms and
geometry clips if necessary.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/scene_graph/custom_draw_operation.rs#L17)

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

### hit_test_geometry

```rust
fn hit_test_geometry(self: &Self, _geometry: &Ref<Geometry>) -> IntersectionResult
```

Hit tests the node against a geometry.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/scene_graph/custom_draw_operation.rs#L20)

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

### render

```rust
fn render(self: &Self, context: &mut ImmediateDrawingContext<'_>)
```

Renders the node to a drawing context.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/scene_graph/custom_draw_operation.rs#L25)

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

### equals

```rust
fn equals(self: &Self, other: &dyn ICustomDrawOperation) -> bool
```

Value equality between operations (C# `IEquatable<ICustomDrawOperation>`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/scene_graph/custom_draw_operation.rs#L28)

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

### dispose

```rust
fn dispose(self: &Self)
```

Releases the operation's resources.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/scene_graph/custom_draw_operation.rs#L31)

## Availability

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