Skip to main content

ClipperD

Struct ClipperD 

Source
pub struct ClipperD {
    pub base: ClipperBase,
    /* private fields */
}
Expand description

Double-precision polygon clipper that scales to int64 internally Direct port from clipper.engine.h line 520

Fields§

§base: ClipperBase

Implementations§

Source§

impl ClipperD

Source

pub fn new(precision: i32) -> Self

Source

pub fn scale(&self) -> f64

Source

pub fn inv_scale(&self) -> f64

Source

pub fn add_subject(&mut self, subjects: &PathsD)

Add subject paths (double precision)

Source

pub fn add_open_subject(&mut self, open_subjects: &PathsD)

Add open subject paths (double precision)

Source

pub fn add_clip(&mut self, clips: &PathsD)

Add clip paths (double precision)

Source

pub fn error_code(&self) -> i32

Source

pub fn set_preserve_collinear(&mut self, val: bool)

Source

pub fn preserve_collinear(&self) -> bool

Source

pub fn set_reverse_solution(&mut self, val: bool)

Source

pub fn reverse_solution(&self) -> bool

Source

pub fn clear(&mut self)

Source

pub fn execute( &mut self, clip_type: ClipType, fill_rule: FillRule, solution_closed: &mut PathsD, solution_open: Option<&mut PathsD>, ) -> bool

Execute a clipping operation with double-precision paths Direct port from clipper.engine.h ClipperD::Execute

Source

pub fn execute_tree( &mut self, clip_type: ClipType, fill_rule: FillRule, polytree: &mut PolyTreeD, open_paths: &mut PathsD, ) -> bool

Execute returning polytree with double-precision

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.