lyon_geom::segment

Trait BoundingBox

source
pub trait BoundingBox {
    type Scalar: Scalar;

    // Required methods
    fn bounding_range_x(&self) -> (Self::Scalar, Self::Scalar);
    fn bounding_range_y(&self) -> (Self::Scalar, Self::Scalar);
    fn fast_bounding_range_x(&self) -> (Self::Scalar, Self::Scalar);
    fn fast_bounding_range_y(&self) -> (Self::Scalar, Self::Scalar);

    // Provided methods
    fn bounding_box(&self) -> Box2D<Self::Scalar> { ... }
    fn fast_bounding_box(&self) -> Box2D<Self::Scalar> { ... }
}

Required Associated Types§

Required Methods§

source

fn bounding_range_x(&self) -> (Self::Scalar, Self::Scalar)

Returns a range of x values that contains the curve.

source

fn bounding_range_y(&self) -> (Self::Scalar, Self::Scalar)

Returns a range of y values that contains the curve.

source

fn fast_bounding_range_x(&self) -> (Self::Scalar, Self::Scalar)

Returns a range of x values that contains the curve.

source

fn fast_bounding_range_y(&self) -> (Self::Scalar, Self::Scalar)

Returns a range of y values that contains the curve.

Provided Methods§

source

fn bounding_box(&self) -> Box2D<Self::Scalar>

Returns the smallest rectangle that contains the curve.

source

fn fast_bounding_box(&self) -> Box2D<Self::Scalar>

Returns a conservative rectangle that contains the curve.

This does not necessarily return the smallest possible bounding rectangle.

Implementors§