pub struct Ellipse { /* private fields */ }Expand description
Ellipse vertex generator.
Generates a closed polygon approximating an ellipse. The number of steps is either specified explicitly or calculated automatically from the approximation scale.
Port of C++ agg::ellipse.
Implementations§
Source§impl Ellipse
impl Ellipse
Sourcepub fn new(x: f64, y: f64, rx: f64, ry: f64, num_steps: u32, cw: bool) -> Self
pub fn new(x: f64, y: f64, rx: f64, ry: f64, num_steps: u32, cw: bool) -> Self
Create a new ellipse with automatic step calculation.
Sourcepub fn default_new() -> Self
pub fn default_new() -> Self
Create a default ellipse (unit circle at origin).
Sourcepub fn init(
&mut self,
x: f64,
y: f64,
rx: f64,
ry: f64,
num_steps: u32,
cw: bool,
)
pub fn init( &mut self, x: f64, y: f64, rx: f64, ry: f64, num_steps: u32, cw: bool, )
Re-initialize with new parameters.
Sourcepub fn set_approximation_scale(&mut self, scale: f64)
pub fn set_approximation_scale(&mut self, scale: f64)
Set approximation scale (affects automatic step count).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Ellipse
impl RefUnwindSafe for Ellipse
impl Send for Ellipse
impl Sync for Ellipse
impl Unpin for Ellipse
impl UnwindSafe for Ellipse
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