# ICustomHitTest

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

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

```rust
trait ICustomHitTest
```

An interface to allow non-templated controls to customize their hit
testing when using a renderer with a simple hit-testing algorithm, where
just the bounds or geometries are hit-tested.

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

## Members

- [`hit_test`](#function-hit_test)
- [`hit_test_geometry`](#function-hit_test_geometry)

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

### hit_test

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

Whether the control is hit at the specified point, in coordinates
relative to the control.

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

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

### hit_test_geometry

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

The intersection of the control with a geometry.

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

## Availability

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