pub struct BufferStyle<T: BoolOpsNum> { /* private fields */ }Expand description
Configuration for buffer styling operations.
BufferStyle controls how the buffer operation creates the resulting polygon,
including the distance from the original geometry and how line segments are joined or capped.
§Examples
use geo::algorithm::buffer::{BufferStyle, LineCap, LineJoin};
// Default round style
let round_style = BufferStyle::new(2.0);
// Square caps with mitered joins
let square_style = BufferStyle::new(2.0)
.line_cap(LineCap::Square)
.line_join(LineJoin::Miter(1.0));Implementations§
Source§impl<T: BoolOpsNum> BufferStyle<T>
impl<T: BoolOpsNum> BufferStyle<T>
Sourcepub fn line_join(self, line_join: LineJoin<T>) -> Self
pub fn line_join(self, line_join: LineJoin<T>) -> Self
Sets how two edges of a geometry should meet at vertices.
Note: This has no effect on point geometries.
§Arguments
line_join- The join style:Round,Miter, orBevel
§Examples
use geo::algorithm::buffer::{Buffer, BufferStyle, LineJoin};
let style = BufferStyle::new(2.0).line_join(LineJoin::Miter(1.0));Sourcepub fn line_cap(self, line_cap: LineCap<BoolOpsCoord<T>, T>) -> Self
pub fn line_cap(self, line_cap: LineCap<BoolOpsCoord<T>, T>) -> Self
Sets how the ends of linear geometries and points should be capped.
This only affects Line, LineString, MultiLineString, Point, and MultiPoint geometries.
Two dimensional geometries, like Polygons, ignore setting.
§Arguments
line_cap- The cap style:Round,Square,Butt, orCustom
§Examples
use geo::algorithm::buffer::{Buffer, BufferStyle, LineCap};
let style = BufferStyle::new(2.0).line_cap(LineCap::Square);Trait Implementations§
Source§impl<T: BoolOpsNum> Clone for BufferStyle<T>
impl<T: BoolOpsNum> Clone for BufferStyle<T>
Auto Trait Implementations§
impl<T> Freeze for BufferStyle<T>where
T: Freeze,
impl<T> RefUnwindSafe for BufferStyle<T>where
T: RefUnwindSafe,
impl<T> Send for BufferStyle<T>where
T: Send,
impl<T> Sync for BufferStyle<T>where
T: Sync,
impl<T> Unpin for BufferStyle<T>where
T: Unpin,
impl<T> UnwindSafe for BufferStyle<T>where
T: UnwindSafe,
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