pub enum Geometry2D {
LineString(LineString),
MultiLineString(MultiLineString),
Polygon(Polygon),
MultiPolygon(MultiPolygon),
Rect(Rect),
Circle(Circle),
Line(Line),
Collection(Geometries2D),
}
Expand description
Geometry
Variants§
LineString(LineString)
Line string.
MultiLineString(MultiLineString)
Multiple line strings.
Polygon(Polygon)
Polygon.
MultiPolygon(MultiPolygon)
Multiple polygons.
Rect(Rect)
Rectangle.
Circle(Circle)
Circle.
Line(Line)
Line.
Collection(Geometries2D)
Collection,
Implementations§
Source§impl Geometry2D
impl Geometry2D
Sourcepub fn boolean_op(
&self,
resolution: &RenderResolution,
other: &Self,
op: &BooleanOp,
) -> MultiPolygon
pub fn boolean_op( &self, resolution: &RenderResolution, other: &Self, op: &BooleanOp, ) -> MultiPolygon
Apply boolean operation.
Sourcepub fn hull(&self, resolution: &RenderResolution) -> Self
pub fn hull(&self, resolution: &RenderResolution) -> Self
Apply hull operation.
Trait Implementations§
Source§impl Align for Geometry2D
impl Align for Geometry2D
Source§fn align(&self, resolution: &RenderResolution) -> Self
fn align(&self, resolution: &RenderResolution) -> Self
Align geometry.
Source§impl Clone for Geometry2D
impl Clone for Geometry2D
Source§fn clone(&self) -> Geometry2D
fn clone(&self) -> Geometry2D
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Geometry2D
impl Debug for Geometry2D
Source§impl FetchBounds2D for Geometry2D
impl FetchBounds2D for Geometry2D
Source§fn fetch_bounds_2d(&self) -> Bounds2D
fn fetch_bounds_2d(&self) -> Bounds2D
Fetch bounds.
Source§impl<'_derivative_strum> From<&'_derivative_strum Geometry2D> for &'static str
impl<'_derivative_strum> From<&'_derivative_strum Geometry2D> for &'static str
Source§fn from(x: &'_derivative_strum Geometry2D) -> &'static str
fn from(x: &'_derivative_strum Geometry2D) -> &'static str
Converts to this type from the input type.
Source§impl From<Geometry2D> for &'static str
impl From<Geometry2D> for &'static str
Source§fn from(x: Geometry2D) -> &'static str
fn from(x: Geometry2D) -> &'static str
Converts to this type from the input type.
Source§impl RenderToMultiPolygon for Geometry2D
impl RenderToMultiPolygon for Geometry2D
Source§fn render_to_existing_multi_polygon(
&self,
resolution: &RenderResolution,
polygons: &mut MultiPolygon,
)
fn render_to_existing_multi_polygon( &self, resolution: &RenderResolution, polygons: &mut MultiPolygon, )
Render a geometry into a new multi polygon and attaches it to a list of existing polygons. Read more
Source§fn render_to_polygon(&self, _: &RenderResolution) -> Option<Polygon>
fn render_to_polygon(&self, _: &RenderResolution) -> Option<Polygon>
Source§fn render_to_multi_polygon(&self, resolution: &RenderResolution) -> MultiPolygon
fn render_to_multi_polygon(&self, resolution: &RenderResolution) -> MultiPolygon
Render a geometry into a new multi polygon. Read more
Source§impl Transformed2D for Geometry2D
impl Transformed2D for Geometry2D
Source§fn transformed_2d(&self, resolution: &RenderResolution, mat: &Mat3) -> Self
fn transformed_2d(&self, resolution: &RenderResolution, mat: &Mat3) -> Self
Transform from matrix.
Auto Trait Implementations§
impl Freeze for Geometry2D
impl RefUnwindSafe for Geometry2D
impl !Send for Geometry2D
impl !Sync for Geometry2D
impl Unpin for Geometry2D
impl UnwindSafe for Geometry2D
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 more