You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After scratching my head for a while, I found out that the end_angle field in iced::widget::canvas::path::arc::Arc is not the angle where the end of the arc lies. It is actually the span of the arc.
In other words, the end of the arc lies at start_angle + end_angle. The field end_angle should be renamed to something like span_angle to prevent confusion.
I've checked that all other uses of end_angle (2 in total) are correct:
// graphics/src/widget/canvas/path/builder.rsimplFrom<Arc>forElliptical{fnfrom(arc:Arc) -> Elliptical{Elliptical{// fields omittedend_angle: arc.end_angle,// line 41}}}
and miraculously, the one other place where end_angle is used also needs no change (which perhaps explains why it went unnoticed)
// graphics/src/widget/canvas/path/builder.rs#[inline]pubfncircle(&mutself,center:Point,radius:f32){self.arc(Arc{
center,
radius,start_angle:0.0,end_angle:2.0* std::f32::consts::PI// line 157});}
Seeing that this is labeled good first issue, I assume it's okay for a beginner like me to open a pull request ?
After scratching my head for a while, I found out that the
end_angle
field in iced::widget::canvas::path::arc::Arc is not the angle where the end of the arc lies. It is actually the span of the arc.In other words, the end of the arc lies at
start_angle + end_angle
. The fieldend_angle
should be renamed to something likespan_angle
to prevent confusion.https://docs.rs/iced/0.1.1/iced/widget/canvas/path/struct.Arc.html
The text was updated successfully, but these errors were encountered: