pub struct MultiPolygon<T = f64>(pub Vec<Polygon<T>>)
where
T: CoordNum;
Expand description
A collection of Polygon
s. Can
be created from a Vec
of Polygon
s, or from an
Iterator which yields Polygon
s. Iterating over this
object yields the component Polygon
s.
§Semantics
The interior and the boundary are the union of the interior and the boundary of the constituent polygons.
§Validity
-
The interiors of no two constituent polygons may intersect.
-
The boundaries of two (distinct) constituent polygons may only intersect at finitely many points.
Refer to section 6.1.14 of the OGC-SFA for a formal definition of validity. Note that the validity is not enforced, but expected by the operations and predicates that operate on it.
Tuple Fields§
§0: Vec<Polygon<T>>
Implementations§
Trait Implementations§
Source§impl<T> AbsDiffEq for MultiPolygon<T>
impl<T> AbsDiffEq for MultiPolygon<T>
Source§fn abs_diff_eq(
&self,
other: &MultiPolygon<T>,
epsilon: <MultiPolygon<T> as AbsDiffEq>::Epsilon,
) -> bool
fn abs_diff_eq( &self, other: &MultiPolygon<T>, epsilon: <MultiPolygon<T> as AbsDiffEq>::Epsilon, ) -> bool
Equality assertion with an absolute limit.
§Examples
use geo_types::{polygon, Polygon, MultiPolygon};
let a_el: Polygon<f32> = polygon![(x: 0., y: 0.), (x: 5., y: 0.), (x: 7., y: 9.), (x: 0., y: 0.)];
let a = MultiPolygon::new(vec![a_el]);
let b_el: Polygon<f32> = polygon![(x: 0., y: 0.), (x: 5., y: 0.), (x: 7.01, y: 9.), (x: 0., y: 0.)];
let b = MultiPolygon::new(vec![b_el]);
approx::abs_diff_eq!(a, b, epsilon=0.1);
approx::abs_diff_ne!(a, b, epsilon=0.001);
Source§fn default_epsilon() -> <MultiPolygon<T> as AbsDiffEq>::Epsilon
fn default_epsilon() -> <MultiPolygon<T> as AbsDiffEq>::Epsilon
Source§fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
AbsDiffEq::abs_diff_eq
.Source§impl<T> Area<T> for MultiPolygon<T>where
T: CoordFloat,
impl<T> Area<T> for MultiPolygon<T>where
T: CoordFloat,
Note. The implementation is a straight-forward
summation of the signed areas of the individual
polygons. In particular, unsigned_area
is not
necessarily the sum of the unsigned_area
of the
constituent polygons unless they are all oriented the
same.
fn signed_area(&self) -> T
fn unsigned_area(&self) -> T
Source§impl<T: BoolOpsNum> BooleanOps for MultiPolygon<T>
impl<T: BoolOpsNum> BooleanOps for MultiPolygon<T>
type Scalar = T
Source§fn rings(&self) -> impl Iterator<Item = &LineString<Self::Scalar>>
fn rings(&self) -> impl Iterator<Item = &LineString<Self::Scalar>>
fn boolean_op( &self, other: &impl BooleanOps<Scalar = Self::Scalar>, op: OpType, ) -> MultiPolygon<Self::Scalar>
fn intersection( &self, other: &impl BooleanOps<Scalar = Self::Scalar>, ) -> MultiPolygon<Self::Scalar>
fn union( &self, other: &impl BooleanOps<Scalar = Self::Scalar>, ) -> MultiPolygon<Self::Scalar>
fn xor( &self, other: &impl BooleanOps<Scalar = Self::Scalar>, ) -> MultiPolygon<Self::Scalar>
fn difference( &self, other: &impl BooleanOps<Scalar = Self::Scalar>, ) -> MultiPolygon<Self::Scalar>
Source§fn clip(
&self,
multi_line_string: &MultiLineString<Self::Scalar>,
invert: bool,
) -> MultiLineString<Self::Scalar>
fn clip( &self, multi_line_string: &MultiLineString<Self::Scalar>, invert: bool, ) -> MultiLineString<Self::Scalar>
Source§impl<T> BoundingRect<T> for MultiPolygon<T>where
T: CoordNum,
impl<T> BoundingRect<T> for MultiPolygon<T>where
T: CoordNum,
Source§impl<T> Centroid for MultiPolygon<T>where
T: GeoFloat,
impl<T> Centroid for MultiPolygon<T>where
T: GeoFloat,
Source§fn centroid(&self) -> Self::Output
fn centroid(&self) -> Self::Output
The Centroid of a MultiPolygon
is the mean of the centroids of its polygons, weighted
by the area of the polygons
§Examples
use geo::Centroid;
use geo::{MultiPolygon, polygon, point};
let multi_polygon = MultiPolygon::new(vec![
// centroid (1.0, 0.5)
polygon![
(x: 0.0f32, y: 0.0),
(x: 2.0, y: 0.0),
(x: 2.0, y: 1.0),
(x: 0.0, y: 1.0),
],
// centroid (-0.5, 0.0)
polygon![
(x: 1.0, y: 1.0),
(x: -2.0, y: 1.0),
(x: -2.0, y: -1.0),
(x: 1.0, y: -1.0),
]
]);
assert_eq!(
// ( 2.0 * (1.0, 0.5) + 6.0 * (-0.5, 0.0) ) / 8.0
Some(point!(x: -0.125, y: 0.125)),
multi_polygon.centroid(),
);
type Output = Option<Point<T>>
Source§impl<T> ChaikinSmoothing<T> for MultiPolygon<T>where
T: CoordFloat + FromPrimitive,
impl<T> ChaikinSmoothing<T> for MultiPolygon<T>where
T: CoordFloat + FromPrimitive,
Source§fn chaikin_smoothing(&self, n_iterations: usize) -> Self
fn chaikin_smoothing(&self, n_iterations: usize) -> Self
n_iterations
times.Source§impl<T> ChamberlainDuquetteArea<T> for MultiPolygon<T>where
T: CoordFloat,
impl<T> ChamberlainDuquetteArea<T> for MultiPolygon<T>where
T: CoordFloat,
fn chamberlain_duquette_signed_area(&self) -> T
fn chamberlain_duquette_unsigned_area(&self) -> T
Source§impl<T> Clone for MultiPolygon<T>
impl<T> Clone for MultiPolygon<T>
Source§fn clone(&self) -> MultiPolygon<T>
fn clone(&self) -> MultiPolygon<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<F: GeoFloat> ClosestPoint<F> for MultiPolygon<F>
impl<F: GeoFloat> ClosestPoint<F> for MultiPolygon<F>
Source§fn closest_point(&self, p: &Point<F>) -> Closest<F>
fn closest_point(&self, p: &Point<F>) -> Closest<F>
self
and p
.Source§impl<T> ConcaveHull for MultiPolygon<T>
impl<T> ConcaveHull for MultiPolygon<T>
Source§impl<F> Contains<GeometryCollection<F>> for MultiPolygon<F>where
F: GeoFloat,
impl<F> Contains<GeometryCollection<F>> for MultiPolygon<F>where
F: GeoFloat,
fn contains(&self, rhs: &GeometryCollection<F>) -> bool
Source§impl<F> Contains<LineString<F>> for MultiPolygon<F>where
F: GeoFloat,
impl<F> Contains<LineString<F>> for MultiPolygon<F>where
F: GeoFloat,
fn contains(&self, rhs: &LineString<F>) -> bool
Source§impl<F> Contains<MultiLineString<F>> for MultiPolygon<F>where
F: GeoFloat,
impl<F> Contains<MultiLineString<F>> for MultiPolygon<F>where
F: GeoFloat,
fn contains(&self, rhs: &MultiLineString<F>) -> bool
Source§impl<T: GeoNum> Contains<MultiPoint<T>> for MultiPolygon<T>
impl<T: GeoNum> Contains<MultiPoint<T>> for MultiPolygon<T>
fn contains(&self, rhs: &MultiPoint<T>) -> bool
Source§impl<T> Contains<MultiPolygon<T>> for Geometry<T>where
T: GeoFloat,
impl<T> Contains<MultiPolygon<T>> for Geometry<T>where
T: GeoFloat,
fn contains(&self, multi_line_string: &MultiPolygon<T>) -> bool
Source§impl<T> Contains<MultiPolygon<T>> for GeometryCollection<T>where
T: GeoFloat,
impl<T> Contains<MultiPolygon<T>> for GeometryCollection<T>where
T: GeoFloat,
fn contains(&self, target: &MultiPolygon<T>) -> bool
Source§impl<T> Contains<MultiPolygon<T>> for Line<T>where
T: GeoFloat,
impl<T> Contains<MultiPolygon<T>> for Line<T>where
T: GeoFloat,
fn contains(&self, target: &MultiPolygon<T>) -> bool
Source§impl<T> Contains<MultiPolygon<T>> for LineString<T>where
T: GeoFloat,
impl<T> Contains<MultiPolygon<T>> for LineString<T>where
T: GeoFloat,
fn contains(&self, target: &MultiPolygon<T>) -> bool
Source§impl<T> Contains<MultiPolygon<T>> for MultiLineString<T>where
T: GeoFloat,
impl<T> Contains<MultiPolygon<T>> for MultiLineString<T>where
T: GeoFloat,
fn contains(&self, target: &MultiPolygon<T>) -> bool
Source§impl<T> Contains<MultiPolygon<T>> for MultiPoint<T>where
T: GeoFloat,
impl<T> Contains<MultiPolygon<T>> for MultiPoint<T>where
T: GeoFloat,
fn contains(&self, target: &MultiPolygon<T>) -> bool
Source§impl<T> Contains<MultiPolygon<T>> for Point<T>where
T: CoordNum,
impl<T> Contains<MultiPolygon<T>> for Point<T>where
T: CoordNum,
fn contains(&self, multi_polygon: &MultiPolygon<T>) -> bool
Source§impl<T> Contains<MultiPolygon<T>> for Polygon<T>where
T: GeoFloat,
impl<T> Contains<MultiPolygon<T>> for Polygon<T>where
T: GeoFloat,
fn contains(&self, target: &MultiPolygon<T>) -> bool
Source§impl<T> Contains<MultiPolygon<T>> for Rect<T>where
T: GeoFloat,
impl<T> Contains<MultiPolygon<T>> for Rect<T>where
T: GeoFloat,
fn contains(&self, target: &MultiPolygon<T>) -> bool
Source§impl<T> Contains<MultiPolygon<T>> for Triangle<T>where
T: GeoFloat,
impl<T> Contains<MultiPolygon<T>> for Triangle<T>where
T: GeoFloat,
fn contains(&self, target: &MultiPolygon<T>) -> bool
Source§impl<F> Contains for MultiPolygon<F>where
F: GeoFloat,
impl<F> Contains for MultiPolygon<F>where
F: GeoFloat,
fn contains(&self, rhs: &MultiPolygon<F>) -> bool
Source§impl<T> CoordinatePosition for MultiPolygon<T>where
T: GeoNum,
impl<T> CoordinatePosition for MultiPolygon<T>where
T: GeoNum,
Source§impl<T: CoordNum> CoordsIter for MultiPolygon<T>
impl<T: CoordNum> CoordsIter for MultiPolygon<T>
Source§fn coords_count(&self) -> usize
fn coords_count(&self) -> usize
Return the number of coordinates in the MultiPolygon
.
type Iter<'a> = Flatten<MapCoordsIter<'a, T, Iter<'a, Polygon<T>>, Polygon<T>>> where T: 'a
type ExteriorIter<'a> = Flatten<MapExteriorCoordsIter<'a, T, Iter<'a, Polygon<T>>, Polygon<T>>> where T: 'a
type Scalar = T
Source§fn coords_iter(&self) -> Self::Iter<'_>
fn coords_iter(&self) -> Self::Iter<'_>
Source§fn exterior_coords_iter(&self) -> Self::ExteriorIter<'_>
fn exterior_coords_iter(&self) -> Self::ExteriorIter<'_>
Source§impl<T> Debug for MultiPolygon<T>
impl<T> Debug for MultiPolygon<T>
Source§impl<F: CoordFloat + FromPrimitive> Densify<F> for MultiPolygon<F>
impl<F: CoordFloat + FromPrimitive> Densify<F> for MultiPolygon<F>
Source§impl<T> DensifyHaversine<T> for MultiPolygon<T>where
T: CoordFloat + FromPrimitive,
Line<T>: HaversineLength<T>,
LineString<T>: HaversineLength<T>,
impl<T> DensifyHaversine<T> for MultiPolygon<T>where
T: CoordFloat + FromPrimitive,
Line<T>: HaversineLength<T>,
LineString<T>: HaversineLength<T>,
Source§type Output = MultiPolygon<T>
type Output = MultiPolygon<T>
line.densify::<Haversine>()
via the Densify
trait instead.Source§fn densify_haversine(&self, max_distance: T) -> Self::Output
fn densify_haversine(&self, max_distance: T) -> Self::Output
line.densify::<Haversine>()
via the Densify
trait instead.Source§impl<F> Distance<F, &Geometry<F>, &MultiPolygon<F>> for Euclideanwhere
F: GeoFloat,
impl<F> Distance<F, &Geometry<F>, &MultiPolygon<F>> for Euclideanwhere
F: GeoFloat,
Source§fn distance(a: &Geometry<F>, b: &MultiPolygon<F>) -> F
fn distance(a: &Geometry<F>, b: &MultiPolygon<F>) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<F> Distance<F, &GeometryCollection<F>, &MultiPolygon<F>> for Euclideanwhere
F: GeoFloat,
impl<F> Distance<F, &GeometryCollection<F>, &MultiPolygon<F>> for Euclideanwhere
F: GeoFloat,
Source§fn distance(a: &GeometryCollection<F>, b: &MultiPolygon<F>) -> F
fn distance(a: &GeometryCollection<F>, b: &MultiPolygon<F>) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<F> Distance<F, &Line<F>, &MultiPolygon<F>> for Euclideanwhere
F: GeoFloat,
impl<F> Distance<F, &Line<F>, &MultiPolygon<F>> for Euclideanwhere
F: GeoFloat,
Source§fn distance(a: &Line<F>, b: &MultiPolygon<F>) -> F
fn distance(a: &Line<F>, b: &MultiPolygon<F>) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<F> Distance<F, &LineString<F>, &MultiPolygon<F>> for Euclideanwhere
F: GeoFloat,
impl<F> Distance<F, &LineString<F>, &MultiPolygon<F>> for Euclideanwhere
F: GeoFloat,
Source§fn distance(a: &LineString<F>, b: &MultiPolygon<F>) -> F
fn distance(a: &LineString<F>, b: &MultiPolygon<F>) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<F: GeoFloat> Distance<F, &MultiLineString<F>, &MultiPolygon<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &MultiLineString<F>, &MultiPolygon<F>> for Euclidean
Source§fn distance(
iter_geometry: &MultiLineString<F>,
to_geometry: &MultiPolygon<F>,
) -> F
fn distance( iter_geometry: &MultiLineString<F>, to_geometry: &MultiPolygon<F>, ) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<F: GeoFloat> Distance<F, &MultiPoint<F>, &MultiPolygon<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &MultiPoint<F>, &MultiPolygon<F>> for Euclidean
Source§fn distance(iter_geometry: &MultiPoint<F>, to_geometry: &MultiPolygon<F>) -> F
fn distance(iter_geometry: &MultiPoint<F>, to_geometry: &MultiPolygon<F>) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &Geometry<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &Geometry<F>> for Euclidean
Source§fn distance(origin: &MultiPolygon<F>, destination: &Geometry<F>) -> F
fn distance(origin: &MultiPolygon<F>, destination: &Geometry<F>) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &GeometryCollection<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &GeometryCollection<F>> for Euclidean
Source§fn distance(
iter_geometry: &MultiPolygon<F>,
to_geometry: &GeometryCollection<F>,
) -> F
fn distance( iter_geometry: &MultiPolygon<F>, to_geometry: &GeometryCollection<F>, ) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &Line<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &Line<F>> for Euclidean
Source§fn distance(iter_geometry: &MultiPolygon<F>, to_geometry: &Line<F>) -> F
fn distance(iter_geometry: &MultiPolygon<F>, to_geometry: &Line<F>) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &LineString<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &LineString<F>> for Euclidean
Source§fn distance(iter_geometry: &MultiPolygon<F>, to_geometry: &LineString<F>) -> F
fn distance(iter_geometry: &MultiPolygon<F>, to_geometry: &LineString<F>) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<F> Distance<F, &MultiPolygon<F>, &MultiLineString<F>> for Euclideanwhere
F: GeoFloat,
impl<F> Distance<F, &MultiPolygon<F>, &MultiLineString<F>> for Euclideanwhere
F: GeoFloat,
Source§fn distance(a: &MultiPolygon<F>, b: &MultiLineString<F>) -> F
fn distance(a: &MultiPolygon<F>, b: &MultiLineString<F>) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<F> Distance<F, &MultiPolygon<F>, &MultiPoint<F>> for Euclideanwhere
F: GeoFloat,
impl<F> Distance<F, &MultiPolygon<F>, &MultiPoint<F>> for Euclideanwhere
F: GeoFloat,
Source§fn distance(a: &MultiPolygon<F>, b: &MultiPoint<F>) -> F
fn distance(a: &MultiPolygon<F>, b: &MultiPoint<F>) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &MultiPolygon<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &MultiPolygon<F>> for Euclidean
Source§fn distance(origin: &MultiPolygon<F>, destination: &MultiPolygon<F>) -> F
fn distance(origin: &MultiPolygon<F>, destination: &MultiPolygon<F>) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &Point<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &Point<F>> for Euclidean
Source§fn distance(iter_geometry: &MultiPolygon<F>, to_geometry: &Point<F>) -> F
fn distance(iter_geometry: &MultiPolygon<F>, to_geometry: &Point<F>) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &Polygon<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &Polygon<F>> for Euclidean
Source§fn distance(iter_geometry: &MultiPolygon<F>, to_geometry: &Polygon<F>) -> F
fn distance(iter_geometry: &MultiPolygon<F>, to_geometry: &Polygon<F>) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &Rect<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &Rect<F>> for Euclidean
Source§fn distance(iter_geometry: &MultiPolygon<F>, to_geometry: &Rect<F>) -> F
fn distance(iter_geometry: &MultiPolygon<F>, to_geometry: &Rect<F>) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &Triangle<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &Triangle<F>> for Euclidean
Source§fn distance(iter_geometry: &MultiPolygon<F>, to_geometry: &Triangle<F>) -> F
fn distance(iter_geometry: &MultiPolygon<F>, to_geometry: &Triangle<F>) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<F> Distance<F, &Point<F>, &MultiPolygon<F>> for Euclideanwhere
F: GeoFloat,
impl<F> Distance<F, &Point<F>, &MultiPolygon<F>> for Euclideanwhere
F: GeoFloat,
Source§fn distance(a: &Point<F>, b: &MultiPolygon<F>) -> F
fn distance(a: &Point<F>, b: &MultiPolygon<F>) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<F> Distance<F, &Polygon<F>, &MultiPolygon<F>> for Euclideanwhere
F: GeoFloat,
impl<F> Distance<F, &Polygon<F>, &MultiPolygon<F>> for Euclideanwhere
F: GeoFloat,
Source§fn distance(a: &Polygon<F>, b: &MultiPolygon<F>) -> F
fn distance(a: &Polygon<F>, b: &MultiPolygon<F>) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<F> Distance<F, &Rect<F>, &MultiPolygon<F>> for Euclideanwhere
F: GeoFloat,
impl<F> Distance<F, &Rect<F>, &MultiPolygon<F>> for Euclideanwhere
F: GeoFloat,
Source§fn distance(a: &Rect<F>, b: &MultiPolygon<F>) -> F
fn distance(a: &Rect<F>, b: &MultiPolygon<F>) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<F> Distance<F, &Triangle<F>, &MultiPolygon<F>> for Euclideanwhere
F: GeoFloat,
impl<F> Distance<F, &Triangle<F>, &MultiPolygon<F>> for Euclideanwhere
F: GeoFloat,
Source§fn distance(a: &Triangle<F>, b: &MultiPolygon<F>) -> F
fn distance(a: &Triangle<F>, b: &MultiPolygon<F>) -> F
Point
to Point
is supported.
See specific implementations for details. Read moreSource§impl<T> EuclideanDistance<T> for MultiPolygon<T>
impl<T> EuclideanDistance<T> for MultiPolygon<T>
Source§fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T
fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<T> EuclideanDistance<T, Geometry<T>> for MultiPolygon<T>
impl<T> EuclideanDistance<T, Geometry<T>> for MultiPolygon<T>
Source§fn euclidean_distance(&self, geom: &Geometry<T>) -> T
fn euclidean_distance(&self, geom: &Geometry<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<T> EuclideanDistance<T, GeometryCollection<T>> for MultiPolygon<T>
impl<T> EuclideanDistance<T, GeometryCollection<T>> for MultiPolygon<T>
Source§fn euclidean_distance(&self, target: &GeometryCollection<T>) -> T
fn euclidean_distance(&self, target: &GeometryCollection<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<T> EuclideanDistance<T, Line<T>> for MultiPolygon<T>
impl<T> EuclideanDistance<T, Line<T>> for MultiPolygon<T>
Source§fn euclidean_distance(&self, target: &Line<T>) -> T
fn euclidean_distance(&self, target: &Line<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<T> EuclideanDistance<T, LineString<T>> for MultiPolygon<T>
impl<T> EuclideanDistance<T, LineString<T>> for MultiPolygon<T>
Source§fn euclidean_distance(&self, target: &LineString<T>) -> T
fn euclidean_distance(&self, target: &LineString<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<T> EuclideanDistance<T, MultiLineString<T>> for MultiPolygon<T>
impl<T> EuclideanDistance<T, MultiLineString<T>> for MultiPolygon<T>
Source§fn euclidean_distance(&self, target: &MultiLineString<T>) -> T
fn euclidean_distance(&self, target: &MultiLineString<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<T> EuclideanDistance<T, MultiPoint<T>> for MultiPolygon<T>
impl<T> EuclideanDistance<T, MultiPoint<T>> for MultiPolygon<T>
Source§fn euclidean_distance(&self, target: &MultiPoint<T>) -> T
fn euclidean_distance(&self, target: &MultiPoint<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<T> EuclideanDistance<T, MultiPolygon<T>> for Geometry<T>
impl<T> EuclideanDistance<T, MultiPolygon<T>> for Geometry<T>
Source§fn euclidean_distance(&self, other: &MultiPolygon<T>) -> T
fn euclidean_distance(&self, other: &MultiPolygon<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<T> EuclideanDistance<T, MultiPolygon<T>> for GeometryCollection<T>
impl<T> EuclideanDistance<T, MultiPolygon<T>> for GeometryCollection<T>
Source§fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T
fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<T> EuclideanDistance<T, MultiPolygon<T>> for Line<T>
impl<T> EuclideanDistance<T, MultiPolygon<T>> for Line<T>
Source§fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T
fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<T> EuclideanDistance<T, MultiPolygon<T>> for LineString<T>
impl<T> EuclideanDistance<T, MultiPolygon<T>> for LineString<T>
Source§fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T
fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<T> EuclideanDistance<T, MultiPolygon<T>> for MultiLineString<T>
impl<T> EuclideanDistance<T, MultiPolygon<T>> for MultiLineString<T>
Source§fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T
fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<T> EuclideanDistance<T, MultiPolygon<T>> for MultiPoint<T>
impl<T> EuclideanDistance<T, MultiPolygon<T>> for MultiPoint<T>
Source§fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T
fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<T> EuclideanDistance<T, MultiPolygon<T>> for Point<T>
impl<T> EuclideanDistance<T, MultiPolygon<T>> for Point<T>
Source§fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T
fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<T> EuclideanDistance<T, MultiPolygon<T>> for Polygon<T>
impl<T> EuclideanDistance<T, MultiPolygon<T>> for Polygon<T>
Source§fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T
fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<T> EuclideanDistance<T, MultiPolygon<T>> for Rect<T>
impl<T> EuclideanDistance<T, MultiPolygon<T>> for Rect<T>
Source§fn euclidean_distance(&self, other: &MultiPolygon<T>) -> T
fn euclidean_distance(&self, other: &MultiPolygon<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<T> EuclideanDistance<T, MultiPolygon<T>> for Triangle<T>
impl<T> EuclideanDistance<T, MultiPolygon<T>> for Triangle<T>
Source§fn euclidean_distance(&self, other: &MultiPolygon<T>) -> T
fn euclidean_distance(&self, other: &MultiPolygon<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<T> EuclideanDistance<T, Point<T>> for MultiPolygon<T>
impl<T> EuclideanDistance<T, Point<T>> for MultiPolygon<T>
Source§fn euclidean_distance(&self, target: &Point<T>) -> T
fn euclidean_distance(&self, target: &Point<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<T> EuclideanDistance<T, Polygon<T>> for MultiPolygon<T>
impl<T> EuclideanDistance<T, Polygon<T>> for MultiPolygon<T>
Source§fn euclidean_distance(&self, target: &Polygon<T>) -> T
fn euclidean_distance(&self, target: &Polygon<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<T> EuclideanDistance<T, Rect<T>> for MultiPolygon<T>
impl<T> EuclideanDistance<T, Rect<T>> for MultiPolygon<T>
Source§fn euclidean_distance(&self, other: &Rect<T>) -> T
fn euclidean_distance(&self, other: &Rect<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<T> EuclideanDistance<T, Triangle<T>> for MultiPolygon<T>
impl<T> EuclideanDistance<T, Triangle<T>> for MultiPolygon<T>
Source§fn euclidean_distance(&self, other: &Triangle<T>) -> T
fn euclidean_distance(&self, other: &Triangle<T>) -> T
Euclidean::distance
method from the Distance
trait insteadSource§impl<'a, F: GeoFloat> From<&'a MultiPolygon<F>> for PreparedGeometry<'a, F>
impl<'a, F: GeoFloat> From<&'a MultiPolygon<F>> for PreparedGeometry<'a, F>
Source§fn from(multi_polygon: &'a MultiPolygon<F>) -> Self
fn from(multi_polygon: &'a MultiPolygon<F>) -> Self
Source§impl<T, IP> From<IP> for MultiPolygon<T>
impl<T, IP> From<IP> for MultiPolygon<T>
Source§fn from(x: IP) -> MultiPolygon<T>
fn from(x: IP) -> MultiPolygon<T>
Source§impl<'a, F: GeoFloat> From<MultiPolygon<F>> for PreparedGeometry<'a, F>
impl<'a, F: GeoFloat> From<MultiPolygon<F>> for PreparedGeometry<'a, F>
Source§fn from(multi_polygon: MultiPolygon<F>) -> Self
fn from(multi_polygon: MultiPolygon<F>) -> Self
Source§impl<T> From<MultiPolygon<T>> for Geometry<T>where
T: CoordNum,
impl<T> From<MultiPolygon<T>> for Geometry<T>where
T: CoordNum,
Source§fn from(x: MultiPolygon<T>) -> Geometry<T>
fn from(x: MultiPolygon<T>) -> Geometry<T>
Source§impl<T: GeoNum> From<MultiPolygon<T>> for MonotonicPolygons<T>
impl<T: GeoNum> From<MultiPolygon<T>> for MonotonicPolygons<T>
Source§fn from(mp: MultiPolygon<T>) -> Self
fn from(mp: MultiPolygon<T>) -> Self
Source§impl<T, IP> From<Vec<IP>> for MultiPolygon<T>
impl<T, IP> From<Vec<IP>> for MultiPolygon<T>
Source§fn from(x: Vec<IP>) -> MultiPolygon<T>
fn from(x: Vec<IP>) -> MultiPolygon<T>
Source§impl<T, IP> FromIterator<IP> for MultiPolygon<T>
impl<T, IP> FromIterator<IP> for MultiPolygon<T>
Source§fn from_iter<I>(iter: I) -> MultiPolygon<T>where
I: IntoIterator<Item = IP>,
fn from_iter<I>(iter: I) -> MultiPolygon<T>where
I: IntoIterator<Item = IP>,
Source§impl GeodesicArea<f64> for MultiPolygon
impl GeodesicArea<f64> for MultiPolygon
Source§fn geodesic_perimeter(&self) -> f64
fn geodesic_perimeter(&self) -> f64
Source§fn geodesic_area_signed(&self) -> f64
fn geodesic_area_signed(&self) -> f64
Source§fn geodesic_area_unsigned(&self) -> f64
fn geodesic_area_unsigned(&self) -> f64
Source§impl<C: CoordNum> HasDimensions for MultiPolygon<C>
impl<C: CoordNum> HasDimensions for MultiPolygon<C>
Source§fn dimensions(&self) -> Dimensions
fn dimensions(&self) -> Dimensions
Rect
s are 2-dimensional, but it’s possible to create degenerate Rect
s which
have either 1 or 0 dimensions. Read moreSource§fn boundary_dimensions(&self) -> Dimensions
fn boundary_dimensions(&self) -> Dimensions
Geometry
’s boundary, as used by OGC-SFA. Read moreSource§impl<T> Hash for MultiPolygon<T>
impl<T> Hash for MultiPolygon<T>
Source§impl<T> HaversineClosestPoint<T> for MultiPolygon<T>where
T: GeoFloat + FromPrimitive,
impl<T> HaversineClosestPoint<T> for MultiPolygon<T>where
T: GeoFloat + FromPrimitive,
fn haversine_closest_point(&self, from: &Point<T>) -> Closest<T>
Source§impl<T> InteriorPoint for MultiPolygon<T>where
T: GeoFloat,
impl<T> InteriorPoint for MultiPolygon<T>where
T: GeoFloat,
Source§impl<G, T> Intersects<G> for MultiPolygon<T>
impl<G, T> Intersects<G> for MultiPolygon<T>
fn intersects(&self, rhs: &G) -> bool
Source§impl<T> Intersects<MultiPolygon<T>> for Line<T>
impl<T> Intersects<MultiPolygon<T>> for Line<T>
fn intersects(&self, rhs: &MultiPolygon<T>) -> bool
Source§impl<T> Intersects<MultiPolygon<T>> for Point<T>
impl<T> Intersects<MultiPolygon<T>> for Point<T>
fn intersects(&self, rhs: &MultiPolygon<T>) -> bool
Source§impl<T> Intersects<MultiPolygon<T>> for Polygon<T>
impl<T> Intersects<MultiPolygon<T>> for Polygon<T>
fn intersects(&self, rhs: &MultiPolygon<T>) -> bool
Source§impl<T> Intersects<MultiPolygon<T>> for Rect<T>
impl<T> Intersects<MultiPolygon<T>> for Rect<T>
fn intersects(&self, rhs: &MultiPolygon<T>) -> bool
Source§impl<T> Intersects<MultiPolygon<T>> for Triangle<T>
impl<T> Intersects<MultiPolygon<T>> for Triangle<T>
fn intersects(&self, rhs: &MultiPolygon<T>) -> bool
Source§impl<'a, T> IntoIterator for &'a MultiPolygon<T>where
T: CoordNum,
impl<'a, T> IntoIterator for &'a MultiPolygon<T>where
T: CoordNum,
Source§impl<'a, T> IntoIterator for &'a mut MultiPolygon<T>where
T: CoordNum,
impl<'a, T> IntoIterator for &'a mut MultiPolygon<T>where
T: CoordNum,
Source§impl<T> IntoIterator for MultiPolygon<T>where
T: CoordNum,
impl<T> IntoIterator for MultiPolygon<T>where
T: CoordNum,
Source§impl<'a, T> IntoParallelIterator for &'a MultiPolygon<T>
impl<'a, T> IntoParallelIterator for &'a MultiPolygon<T>
Source§fn into_par_iter(self) -> <&'a MultiPolygon<T> as IntoParallelIterator>::Iter
fn into_par_iter(self) -> <&'a MultiPolygon<T> as IntoParallelIterator>::Iter
self
into a parallel iterator. Read moreSource§impl<'a, T> IntoParallelIterator for &'a mut MultiPolygon<T>
impl<'a, T> IntoParallelIterator for &'a mut MultiPolygon<T>
Source§fn into_par_iter(
self,
) -> <&'a mut MultiPolygon<T> as IntoParallelIterator>::Iter
fn into_par_iter( self, ) -> <&'a mut MultiPolygon<T> as IntoParallelIterator>::Iter
self
into a parallel iterator. Read moreSource§impl<T> IntoParallelIterator for MultiPolygon<T>
impl<T> IntoParallelIterator for MultiPolygon<T>
Source§fn into_par_iter(self) -> <MultiPolygon<T> as IntoParallelIterator>::Iter
fn into_par_iter(self) -> <MultiPolygon<T> as IntoParallelIterator>::Iter
self
into a parallel iterator. Read moreSource§impl<'a, T: CoordNum + 'a> LinesIter<'a> for MultiPolygon<T>
impl<'a, T: CoordNum + 'a> LinesIter<'a> for MultiPolygon<T>
type Scalar = T
type Iter = Flatten<MapLinesIter<'a, Iter<'a, Polygon<<MultiPolygon<T> as LinesIter<'a>>::Scalar>>, Polygon<<MultiPolygon<T> as LinesIter<'a>>::Scalar>>>
Source§fn lines_iter(&'a self) -> Self::Iter
fn lines_iter(&'a self) -> Self::Iter
Source§impl<T: CoordNum, NT: CoordNum> MapCoords<T, NT> for MultiPolygon<T>
impl<T: CoordNum, NT: CoordNum> MapCoords<T, NT> for MultiPolygon<T>
Source§impl<T: CoordNum> MapCoordsInPlace<T> for MultiPolygon<T>
impl<T: CoordNum> MapCoordsInPlace<T> for MultiPolygon<T>
Source§impl<T> Orient for MultiPolygon<T>where
T: GeoNum,
impl<T> Orient for MultiPolygon<T>where
T: GeoNum,
Source§impl<T> PartialEq for MultiPolygon<T>
impl<T> PartialEq for MultiPolygon<T>
Source§impl<T> RTreeObject for MultiPolygon<T>
impl<T> RTreeObject for MultiPolygon<T>
Source§impl<F: GeoFloat> Relate<F> for MultiPolygon<F>
impl<F: GeoFloat> Relate<F> for MultiPolygon<F>
Source§fn geometry_graph(&self, arg_index: usize) -> GeometryGraph<'_, F>
fn geometry_graph(&self, arg_index: usize) -> GeometryGraph<'_, F>
GeometryGraph
fn relate(&self, other: &impl Relate<F>) -> IntersectionMatrix
Source§impl<T> RelativeEq for MultiPolygon<T>
impl<T> RelativeEq for MultiPolygon<T>
Source§fn relative_eq(
&self,
other: &MultiPolygon<T>,
epsilon: <MultiPolygon<T> as AbsDiffEq>::Epsilon,
max_relative: <MultiPolygon<T> as AbsDiffEq>::Epsilon,
) -> bool
fn relative_eq( &self, other: &MultiPolygon<T>, epsilon: <MultiPolygon<T> as AbsDiffEq>::Epsilon, max_relative: <MultiPolygon<T> as AbsDiffEq>::Epsilon, ) -> bool
Equality assertion within a relative limit.
§Examples
use geo_types::{polygon, Polygon, MultiPolygon};
let a_el: Polygon<f32> = polygon![(x: 0., y: 0.), (x: 5., y: 0.), (x: 7., y: 9.), (x: 0., y: 0.)];
let a = MultiPolygon::new(vec![a_el]);
let b_el: Polygon<f32> = polygon![(x: 0., y: 0.), (x: 5., y: 0.), (x: 7.01, y: 9.), (x: 0., y: 0.)];
let b = MultiPolygon::new(vec![b_el]);
approx::assert_relative_eq!(a, b, max_relative=0.1);
approx::assert_relative_ne!(a, b, max_relative=0.001);
Source§fn default_max_relative() -> <MultiPolygon<T> as AbsDiffEq>::Epsilon
fn default_max_relative() -> <MultiPolygon<T> as AbsDiffEq>::Epsilon
Source§fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
RelativeEq::relative_eq
.Source§impl<T> RemoveRepeatedPoints<T> for MultiPolygon<T>where
T: CoordNum + FromPrimitive,
impl<T> RemoveRepeatedPoints<T> for MultiPolygon<T>where
T: CoordNum + FromPrimitive,
Source§fn remove_repeated_points(&self) -> Self
fn remove_repeated_points(&self) -> Self
Create a MultiPolygon with consecutive repeated points removed.
Source§fn remove_repeated_points_mut(&mut self)
fn remove_repeated_points_mut(&mut self)
Remove consecutive repeated points from a MultiPolygon inplace.
Source§impl<T> Simplify<T> for MultiPolygon<T>where
T: GeoFloat,
impl<T> Simplify<T> for MultiPolygon<T>where
T: GeoFloat,
Source§impl<T> SimplifyVw<T> for MultiPolygon<T>where
T: CoordFloat,
impl<T> SimplifyVw<T> for MultiPolygon<T>where
T: CoordFloat,
Source§fn simplify_vw(&self, epsilon: &T) -> MultiPolygon<T>
fn simplify_vw(&self, epsilon: &T) -> MultiPolygon<T>
Source§impl<T> SimplifyVwPreserve<T> for MultiPolygon<T>
impl<T> SimplifyVwPreserve<T> for MultiPolygon<T>
Source§fn simplify_vw_preserve(&self, epsilon: &T) -> MultiPolygon<T>
fn simplify_vw_preserve(&self, epsilon: &T) -> MultiPolygon<T>
Source§impl<T> TryFrom<Geometry<T>> for MultiPolygon<T>where
T: CoordNum,
impl<T> TryFrom<Geometry<T>> for MultiPolygon<T>where
T: CoordNum,
Convert a Geometry enum into its inner type.
Fails if the enum case does not match the type you are trying to convert it to.
impl<T> Eq for MultiPolygon<T>
impl<T> StructuralPartialEq for MultiPolygon<T>where
T: CoordNum,
Auto Trait Implementations§
impl<T> Freeze for MultiPolygon<T>
impl<T> RefUnwindSafe for MultiPolygon<T>where
T: RefUnwindSafe,
impl<T> Send for MultiPolygon<T>where
T: Send,
impl<T> Sync for MultiPolygon<T>where
T: Sync,
impl<T> Unpin for MultiPolygon<T>where
T: Unpin,
impl<T> UnwindSafe for MultiPolygon<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T, M> AffineOps<T> for M
impl<T, M> AffineOps<T> for M
Source§fn affine_transform(&self, transform: &AffineTransform<T>) -> M
fn affine_transform(&self, transform: &AffineTransform<T>) -> M
transform
immutably, outputting a new geometry.Source§fn affine_transform_mut(&mut self, transform: &AffineTransform<T>)
fn affine_transform_mut(&mut self, transform: &AffineTransform<T>)
transform
to mutate self
.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'a, T, G> ConvexHull<'a, T> for Gwhere
T: GeoNum,
G: CoordsIter<Scalar = T>,
impl<'a, T, G> ConvexHull<'a, T> for Gwhere
T: GeoNum,
G: CoordsIter<Scalar = T>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<'a, T, G> Extremes<'a, T> for Gwhere
G: CoordsIter<Scalar = T>,
T: CoordNum,
impl<'a, T, G> Extremes<'a, T> for Gwhere
G: CoordsIter<Scalar = T>,
T: CoordNum,
Source§impl<T, G> HausdorffDistance<T> for Gwhere
T: GeoFloat,
G: CoordsIter<Scalar = T>,
impl<T, G> HausdorffDistance<T> for Gwhere
T: GeoFloat,
G: CoordsIter<Scalar = T>,
fn hausdorff_distance<Rhs>(&self, rhs: &Rhs) -> Twhere
Rhs: CoordsIter<Scalar = T>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<'data, I> IntoParallelRefIterator<'data> for I
impl<'data, I> IntoParallelRefIterator<'data> for I
Source§impl<'data, I> IntoParallelRefMutIterator<'data> for I
impl<'data, I> IntoParallelRefMutIterator<'data> for I
Source§type Iter = <&'data mut I as IntoParallelIterator>::Iter
type Iter = <&'data mut I as IntoParallelIterator>::Iter
Source§type Item = <&'data mut I as IntoParallelIterator>::Item
type Item = <&'data mut I as IntoParallelIterator>::Item
&'data mut T
reference.Source§fn par_iter_mut(
&'data mut self,
) -> <I as IntoParallelRefMutIterator<'data>>::Iter
fn par_iter_mut( &'data mut self, ) -> <I as IntoParallelRefMutIterator<'data>>::Iter
self
. Read moreSource§impl<T, G> MinimumRotatedRect<T> for G
impl<T, G> MinimumRotatedRect<T> for G
type Scalar = T
fn minimum_rotated_rect( &self, ) -> Option<Polygon<<G as MinimumRotatedRect<T>>::Scalar>>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<G, IP, IR, T> Rotate<T> for G
impl<G, IP, IR, T> Rotate<T> for G
Source§fn rotate_around_centroid(&self, degrees: T) -> G
fn rotate_around_centroid(&self, degrees: T) -> G
Source§fn rotate_around_centroid_mut(&mut self, degrees: T)
fn rotate_around_centroid_mut(&mut self, degrees: T)
Self::rotate_around_centroid
Source§fn rotate_around_center(&self, degrees: T) -> G
fn rotate_around_center(&self, degrees: T) -> G
Source§fn rotate_around_center_mut(&mut self, degrees: T)
fn rotate_around_center_mut(&mut self, degrees: T)
Self::rotate_around_center
Source§fn rotate_around_point(&self, degrees: T, point: Point<T>) -> G
fn rotate_around_point(&self, degrees: T, point: Point<T>) -> G
Source§fn rotate_around_point_mut(&mut self, degrees: T, point: Point<T>)
fn rotate_around_point_mut(&mut self, degrees: T, point: Point<T>)
Self::rotate_around_point
Source§impl<T, IR, G> Scale<T> for Gwhere
T: CoordFloat,
IR: Into<Option<Rect<T>>>,
G: Clone + AffineOps<T> + BoundingRect<T, Output = IR>,
impl<T, IR, G> Scale<T> for Gwhere
T: CoordFloat,
IR: Into<Option<Rect<T>>>,
G: Clone + AffineOps<T> + BoundingRect<T, Output = IR>,
Source§fn scale(&self, scale_factor: T) -> G
fn scale(&self, scale_factor: T) -> G
Source§fn scale_xy(&self, x_factor: T, y_factor: T) -> G
fn scale_xy(&self, x_factor: T, y_factor: T) -> G
x_factor
and
y_factor
to distort the geometry’s aspect ratio. Read moreSource§fn scale_xy_mut(&mut self, x_factor: T, y_factor: T)
fn scale_xy_mut(&mut self, x_factor: T, y_factor: T)
scale_xy
.Source§fn scale_around_point(
&self,
x_factor: T,
y_factor: T,
origin: impl Into<Coord<T>>,
) -> G
fn scale_around_point( &self, x_factor: T, y_factor: T, origin: impl Into<Coord<T>>, ) -> G
origin
. Read moreSource§fn scale_around_point_mut(
&mut self,
x_factor: T,
y_factor: T,
origin: impl Into<Coord<T>>,
)
fn scale_around_point_mut( &mut self, x_factor: T, y_factor: T, origin: impl Into<Coord<T>>, )
scale_around_point
.Source§impl<T, IR, G> Skew<T> for Gwhere
T: CoordFloat,
IR: Into<Option<Rect<T>>>,
G: Clone + AffineOps<T> + BoundingRect<T, Output = IR>,
impl<T, IR, G> Skew<T> for Gwhere
T: CoordFloat,
IR: Into<Option<Rect<T>>>,
G: Clone + AffineOps<T> + BoundingRect<T, Output = IR>,
Source§fn skew(&self, degrees: T) -> G
fn skew(&self, degrees: T) -> G
Source§fn skew_xy(&self, degrees_x: T, degrees_y: T) -> G
fn skew_xy(&self, degrees_x: T, degrees_y: T) -> G
Source§fn skew_xy_mut(&mut self, degrees_x: T, degrees_y: T)
fn skew_xy_mut(&mut self, degrees_x: T, degrees_y: T)
skew_xy
.Source§fn skew_around_point(&self, xs: T, ys: T, origin: impl Into<Coord<T>>) -> G
fn skew_around_point(&self, xs: T, ys: T, origin: impl Into<Coord<T>>) -> G
origin
, sheared by an
angle along the x and y dimensions. Read moreSource§fn skew_around_point_mut(&mut self, xs: T, ys: T, origin: impl Into<Coord<T>>)
fn skew_around_point_mut(&mut self, xs: T, ys: T, origin: impl Into<Coord<T>>)
skew_around_point
.