pub struct ObstacleLayoutHelper;Expand description
Geometry utilities for carving horizontal text slots from exclusion shapes.
Implementations§
Source§impl ObstacleLayoutHelper
impl ObstacleLayoutHelper
Sourcepub fn carve_text_line_slots(
base_slot: Interval,
blocked: impl IntoIterator<Item = Interval>,
min_slot_width: f64,
) -> Vec<Interval>
pub fn carve_text_line_slots( base_slot: Interval, blocked: impl IntoIterator<Item = Interval>, min_slot_width: f64, ) -> Vec<Interval>
Carve all blocked intervals, then discard slots narrower than the minimum. The surviving intervals remain ordered from left to right.
Sourcepub fn circle_interval_for_band(
cx: f64,
cy: f64,
radius: f64,
band_top: f64,
band_bottom: f64,
horizontal_padding: f64,
vertical_padding: f64,
) -> Option<Interval>
pub fn circle_interval_for_band( cx: f64, cy: f64, radius: f64, band_top: f64, band_bottom: f64, horizontal_padding: f64, vertical_padding: f64, ) -> Option<Interval>
The widest horizontal intersection of a circle with the entire line band.
A tangent band has no occupied area and yields None.
pub fn ellipse_interval_for_band( cx: f64, cy: f64, radius_x: f64, radius_y: f64, band_top: f64, band_bottom: f64, horizontal_padding: f64, vertical_padding: f64, ) -> Option<Interval>
pub fn get_rect_intervals_for_band( rects: &[RectObstacle], band_top: f64, band_bottom: f64, horizontal_padding: f64, vertical_padding: f64, ) -> Vec<Interval>
Auto Trait Implementations§
impl Freeze for ObstacleLayoutHelper
impl RefUnwindSafe for ObstacleLayoutHelper
impl Send for ObstacleLayoutHelper
impl Sync for ObstacleLayoutHelper
impl Unpin for ObstacleLayoutHelper
impl UnsafeUnpin for ObstacleLayoutHelper
impl UnwindSafe for ObstacleLayoutHelper
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more