Fix rounded corner drawing
This commit is contained in:
parent
ab50a8e130
commit
69318a02e5
|
@ -255,10 +255,10 @@ impl DrawContext {
|
|||
let delta = PI / 4.0 / spoke_num;
|
||||
|
||||
let (mut theta, limit) = match corner {
|
||||
Corner::TopRight => (0.0, FRAC_PI_2),
|
||||
Corner::BottomRight => (FRAC_PI_2 * 3.0, PI * 2.0),
|
||||
Corner::BottomLeft => (PI, FRAC_PI_2 * 3.0),
|
||||
Corner::TopLeft => (FRAC_PI_2, PI),
|
||||
Corner::TopRight => (FRAC_PI_2 * 3.0, PI * 2.0),
|
||||
Corner::BottomRight => (0.0, FRAC_PI_2),
|
||||
Corner::BottomLeft => (FRAC_PI_2, PI),
|
||||
Corner::TopLeft => (PI, FRAC_PI_2 * 3.0),
|
||||
};
|
||||
|
||||
let mut last_spoke = Vec2::from_angle(theta) * radius + center;
|
||||
|
|
Loading…
Reference in New Issue