# HitShape

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-livecharts/scene/enum-hitshape/

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

```rust
enum HitShape
```



[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/scene.rs#L160)

## Members

- [`Rectangle`](#variant-rectangle)
- [`Circle`](#variant-circle)
- [`AnnularSector`](#variant-annularsector)
- [`Polygon`](#variant-polygon)
- [`CompoundPolygon`](#variant-compoundpolygon)
- [`WithHoverArea`](#variant-withhoverarea)
- [`Compound`](#variant-compound)
- [`contains`](#function-contains)
- [`hover_bounds`](#function-hover_bounds)
- [`hover_center`](#function-hover_center)

<a id="variant-rectangle"></a>

### Rectangle

```rust
Rectangle(ferroui_base::Rect)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/scene.rs#L161)

<a id="variant-circle"></a>

### Circle

```rust
Circle { center: ferroui_base::Point, radius: f64 }
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/scene.rs#L162)

<a id="variant-annularsector"></a>

### AnnularSector

```rust
AnnularSector { center: ferroui_base::Point, inner_radius: f64, outer_radius: f64, start_angle: f64, sweep_angle: f64 }
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/scene.rs#L166)

<a id="variant-polygon"></a>

### Polygon

```rust
Polygon(Vec<ferroui_base::Point>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/scene.rs#L173)

<a id="variant-compoundpolygon"></a>

### CompoundPolygon

```rust
CompoundPolygon(Vec<Vec<ferroui_base::Point>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/scene.rs#L174)

<a id="variant-withhoverarea"></a>

### WithHoverArea

```rust
WithHoverArea { shape: Box<HitShape>, bounds: ferroui_base::Rect }
```

Exact geometry may differ from the category slot used for hover discovery.
This is how a thin column and both ends of a range remain discoverable.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/scene.rs#L177)

<a id="variant-compound"></a>

### Compound

```rust
Compound(Vec<HitShape>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/scene.rs#L181)

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

### contains

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/scene.rs#L199)

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

### hover_bounds

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

Axis-aligned hover extent, in control-local units. These bounds may be
intentionally wider than the painted geometry, as in the upstream bar series.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/scene.rs#L250)

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

### hover_center

```rust
fn hover_center(self: &Self) -> Point
```

The point distances are measured from: the centre of the hover extent, and for an
annular sector the middle of the sector itself, not the centre of its circle (which is
outside of a ring).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/scene.rs#L289)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`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/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`

## Availability

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