pub struct Arc { /* private fields */ }Expand description
Arc vertex generator.
Generates vertices along an elliptical arc defined by center, radii, start angle, end angle, and direction (CW/CCW).
Port of C++ agg::arc.
Implementations§
Source§impl Arc
impl Arc
Sourcepub fn new(
x: f64,
y: f64,
rx: f64,
ry: f64,
a1: f64,
a2: f64,
ccw: bool,
) -> Self
pub fn new( x: f64, y: f64, rx: f64, ry: f64, a1: f64, a2: f64, ccw: bool, ) -> Self
Create a new arc.
Sourcepub fn default_new() -> Self
pub fn default_new() -> Self
Create a default (uninitialized) arc.
Sourcepub fn init(
&mut self,
x: f64,
y: f64,
rx: f64,
ry: f64,
a1: f64,
a2: f64,
ccw: bool,
)
pub fn init( &mut self, x: f64, y: f64, rx: f64, ry: f64, a1: f64, a2: f64, ccw: bool, )
Re-initialize with new parameters.
Sourcepub fn set_approximation_scale(&mut self, s: f64)
pub fn set_approximation_scale(&mut self, s: f64)
Set approximation scale (affects step size).
Sourcepub fn approximation_scale(&self) -> f64
pub fn approximation_scale(&self) -> f64
Get current approximation scale.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Arc
impl RefUnwindSafe for Arc
impl Send for Arc
impl Sync for Arc
impl Unpin for Arc
impl UnwindSafe for Arc
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