Skip to content

Commit 5f3d801

Browse files
committed
Fix pistons scaling of circles
1 parent dee7727 commit 5f3d801

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/drawing/backend_impl/piston.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,11 @@ impl<'a, 'b> DrawingBackend for PistonBackend<'a, 'b> {
150150
style: &S,
151151
fill: bool,
152152
) -> Result<(), DrawingErrorKind<Self::ErrorType>> {
153-
let rect = circle(center.0 as f64, center.1 as f64, radius as f64);
153+
let rect = circle(
154+
center.0 as f64 * self.scale,
155+
center.1 as f64 * self.scale,
156+
radius as f64 * self.scale,
157+
);
154158
if fill {
155159
ellipse(
156160
make_piston_rgba(&style.as_color()),

0 commit comments

Comments
 (0)