HitShape
enum · ferroui-livecharts · v0.5.0
enum HitShape
Members
RectangleCircleAnnularSectorPolygonCompoundPolygonWithHoverAreaCompoundcontainshover_boundshover_center
Rectangle
Rectangle(ferroui_base::Rect)
Circle
Circle { center: ferroui_base::Point, radius: f64 }
AnnularSector
AnnularSector { center: ferroui_base::Point, inner_radius: f64, outer_radius: f64, start_angle: f64, sweep_angle: f64 }
Polygon
Polygon(Vec<ferroui_base::Point>)
CompoundPolygon
CompoundPolygon(Vec<Vec<ferroui_base::Point>>)
WithHoverArea
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.
Compound
Compound(Vec<HitShape>)
contains
fn contains(self: &Self, point: Point) -> bool
hover_bounds
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.
hover_center
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).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherCloneDebugStructuralPartialEqPartialEq
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.