Struct gfx_draping::Polygon
[−]
[src]
pub struct Polygon { /* fields omitted */ }
A polygon with a bounding box.
This struct implements From<geoo:Polygon>
, so for GIS applications you can instantiate this
from any geo::Polygon
.
Methods
impl Polygon
[src]
fn new(bounds: [(f32, f32); 2], points: Vec<(f32, f32)>) -> Polygon
[src]
Construct a Polygon from a bounding-box and set of points.
bounds
should be [(min_x, max_x), (min_y, max_y)]
.
points
should be an exterior ring concatenated with a (possibly empty) set of interior
rings, where a "ring" is a list of points where the first and last point are equal.
The exterior ring of points
should be positively oriented, i.e. it should go in
counter-clockwise order. The interior rings should be negatively oriented.
Trait Implementations
impl Clone for Polygon
[src]
fn clone(&self) -> Polygon
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more