pub struct Poly { /* private fields */ }Expand description
An owned polygon.
Implementations§
Source§impl Poly
impl Poly
pub fn rect(&self) -> Rect
pub fn num_holes(&self) -> usize
pub fn clockwise(&self) -> bool
pub fn exterior(&self) -> RingRef<'_>
pub fn hole_at(&self, index: usize) -> Option<RingRef<'_>>
pub fn new(exterior: &Ring, holes: &[&Ring]) -> Result<Self>
pub fn new_simple(exterior: &Ring) -> Result<Self>
Sourcepub unsafe fn from_raw(ptr: *mut tg_poly) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut tg_poly) -> Option<Self>
§Safety
The pointer must be valid and not owned elsewhere.