Struct graphics::circle_arc::CircleArc
[−]
[src]
pub struct CircleArc {
pub color: Color,
pub radius: Radius,
pub start: Scalar,
pub end: Scalar,
pub resolution: Resolution,
}A curved line
Fields
color | The arcs color |
radius | The radius of the arc (Thickness of the drawing, not the radius of the circle) |
start | The start of the arc in radians |
end | The end of the arc in radians |
resolution | The resolution for the arc. |
Methods
impl CircleArc
fn new(color: Color, radius: Radius, start: Scalar, end: Scalar) -> CircleArc
Creates a new arc
fn color(self, value: Color) -> Self
Sets the arcs color.
fn radius(self, value: Radius) -> Self
Sets the radius of the arc (Thickness of the arc, not the radius of the circle it wraps)
fn start(self, value: Scalar) -> Self
Sets the start of the arc (in radians).
fn end(self, value: Scalar) -> Self
Sets the end of the arc (in radians).
fn resolution(self, value: Resolution) -> Self
Sets the resolution of the arcs smoothness.
fn draw<R: Into<Rectangle>, G>(&self, rectangle: R, draw_state: &DrawState, transform: Matrix2d, g: &mut G) where G: Graphics
Draws circle arc using default method.
fn draw_tri<R: Into<Rectangle>, G>(&self, rectangle: R, draw_state: &DrawState, transform: Matrix2d, g: &mut G) where G: Graphics
Draws circle arc using triangulation.