diff options
author | 2023-08-15 08:07:42 +0200 | |
---|---|---|
committer | 2023-08-15 08:07:42 +0200 | |
commit | aadf6821c93048b7552e8b5f6a9358c85fafcb0e (patch) | |
tree | 799fd49da68c7df3b66ad9512296e912e98980f0 | |
parent | f5b95629009ecde8c6f6388c8f33ec43d30d17d1 (diff) | |
parent | 5dbf5adb0af83e3acc9d7c62bb75c0a83f8543bf (diff) | |
download | iced-aadf6821c93048b7552e8b5f6a9358c85fafcb0e.tar.gz iced-aadf6821c93048b7552e8b5f6a9358c85fafcb0e.tar.bz2 iced-aadf6821c93048b7552e8b5f6a9358c85fafcb0e.zip |
Merge pull request #2008 from ua-kxie/arc-and-ellipse-documentation
Update arc.rs with improved documentation
Diffstat (limited to '')
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | graphics/src/geometry/path/arc.rs | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d9c7349..e69b26eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -87,6 +87,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `TextInput` pasting text when `Alt` key is pressed. [#2006](https://github.com/iced-rs/iced/pull/2006) - Broken link to old `iced_native` crate in `README`. [#2024](https://github.com/iced-rs/iced/pull/2024) - `Rectangle::contains` being non-exclusive. [#2017](https://github.com/iced-rs/iced/pull/2017) +- Documentation for `Arc` and `arc::Elliptical`. [#2008](https://github.com/iced-rs/iced/pull/2008) Many thanks to... @@ -115,6 +116,7 @@ Many thanks to... - @rs017991 - @tarkah - @thunderstorm010 +- @ua-kxie - @wash2 - @wiiznokes diff --git a/graphics/src/geometry/path/arc.rs b/graphics/src/geometry/path/arc.rs index 2cdebb66..dd4fcf33 100644 --- a/graphics/src/geometry/path/arc.rs +++ b/graphics/src/geometry/path/arc.rs @@ -8,9 +8,9 @@ pub struct Arc { pub center: Point, /// The radius of the arc. pub radius: f32, - /// The start of the segment's angle, clockwise rotation. + /// The start of the segment's angle in radians, clockwise rotation from positive x-axis. pub start_angle: f32, - /// The end of the segment's angle, clockwise rotation. + /// The end of the segment's angle in radians, clockwise rotation from positive x-axis. pub end_angle: f32, } @@ -19,13 +19,13 @@ pub struct Arc { pub struct Elliptical { /// The center of the arc. pub center: Point, - /// The radii of the arc's ellipse, defining its axes. + /// The radii of the arc's ellipse. The horizontal and vertical half-dimensions of the ellipse will match the x and y values of the radii vector. pub radii: Vector, - /// The rotation of the arc's ellipse. + /// The clockwise rotation of the arc's ellipse. pub rotation: f32, - /// The start of the segment's angle, clockwise rotation. + /// The start of the segment's angle in radians, clockwise rotation from positive x-axis. pub start_angle: f32, - /// The end of the segment's angle, clockwise rotation. + /// The end of the segment's angle in radians, clockwise rotation from positive x-axis. pub end_angle: f32, } |