Struct math2d::ArcSegment
source · #[repr(C)]pub struct ArcSegment {
pub point: Point2f,
pub size: Sizef,
pub rotation_angle: f32,
pub sweep_direction: SweepDirection,
pub arc_size: ArcSize,
}Expand description
Describes an elliptical arc between two points. The starting point is implicit when an ArcSegment is used as part of a Path, as it is a continuation from the previous segment.
Fields§
§point: Point2fThe end point of the arc.
size: SizefThe x and y radius of the arc.
rotation_angle: f32A value that specifies how many degrees in the clockwise direction the ellipse is rotated relative to the current coordinate system.
sweep_direction: SweepDirectionA value that specifies whether the arc sweep is clockwise or counterclockwise.
arc_size: ArcSizeA value that specifies whether the given arc is larger than 180 degrees.
Implementations§
source§impl ArcSegment
impl ArcSegment
sourcepub fn new(
point: impl Into<Point2f>,
size: impl Into<Sizef>,
rotation_angle: f32,
sweep_direction: SweepDirection,
arc_size: ArcSize
) -> ArcSegment
pub fn new(
point: impl Into<Point2f>,
size: impl Into<Sizef>,
rotation_angle: f32,
sweep_direction: SweepDirection,
arc_size: ArcSize
) -> ArcSegment
Constructs an ArcSegment from its parts, more conveniently allowing types that may be converted into Point and Size (such as tuples of floats)
Trait Implementations§
source§impl Clone for ArcSegment
impl Clone for ArcSegment
source§fn clone(&self) -> ArcSegment
fn clone(&self) -> ArcSegment
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ArcSegment
impl Debug for ArcSegment
source§impl Default for ArcSegment
impl Default for ArcSegment
source§fn default() -> ArcSegment
fn default() -> ArcSegment
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ArcSegment
impl<'de> Deserialize<'de> for ArcSegment
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more