pub struct BufferParams<'a> { /* private fields */ }
Expand description

Contains the parameters which describe how a Geometry buffer should be constructed using buffer_with_params

Implementations

Specifies the end cap style of the generated buffer.

Sets the join style for outside (reflex) corners between line segments.

Sets the limit on the mitre ratio used for very sharp corners.

The mitre ratio is the ratio of the distance from the corner to the end of the mitred offset corner. When two line segments meet at a sharp angle, a miter join will extend far beyond the original geometry. (and in the extreme case will be infinitely far.) To prevent unreasonable geometry, the mitre limit allows controlling the maximum length of the join corner. Corners with a ratio which exceed the limit will be beveled.

Sets the number of line segments used to approximate an angle fillet.

  • If quadsegs >= 1, joins are round, and quadsegs indicates the number of segments to use to approximate a quarter-circle.
  • If quadsegs = 0, joins are bevelled (flat)
  • If quadSegs < 0, joins are mitred, and the value of qs indicates the mitre ration limit as mitreLimit = |quadsegs|

For round joins, quadsegs determines the maximum error in the approximation to the true buffer curve.

The default value of 8 gives less than 2% max error in the buffer distance.

For a max error of < 1%, use QS = 12. For a max error of < 0.1%, use QS = 18. The error is always less than the buffer distance (in other words, the computed buffer curve is always inside the true curve).

Sets whether the computed buffer should be single-sided.

A single-sided buffer is constructed on only one side of each input line.

The side used is determined by the sign of the buffer distance:

  • a positive distance indicates the left-hand side
  • a negative distance indicates the right-hand side

The single-sided buffer of point geometries is the same as the regular buffer.

The End Cap Style for single-sided buffers is always ignored, and forced to the equivalent of CapStyle::Flat.

Trait Implementations

Gets the last error (if any) from the ContextHandle held by this object. Read more

Gets the last notification (if any) from the ContextHandle held by this object. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.