Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c834296 authored by Deepanshu Gupta's avatar Deepanshu Gupta
Browse files

Fix RoundRect radius.

Android APIs use radius for measuring the corner's curvature, but Java2D
APIs use diameter. Add the missing conversion.

Change-Id: I630fc8712e8301324c641885c0c4adf644d13b7e
parent 6a5b2110
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -675,7 +675,7 @@ public final class Canvas_Delegate {
                            graphics.fillRoundRect(
                                    (int)left, (int)top,
                                    (int)(right - left), (int)(bottom - top),
                                    (int)rx, (int)ry);
                                    2 * (int)rx, 2 * (int)ry);
                        }

                        if (style == Paint.Style.STROKE.nativeInt ||
@@ -683,7 +683,7 @@ public final class Canvas_Delegate {
                            graphics.drawRoundRect(
                                    (int)left, (int)top,
                                    (int)(right - left), (int)(bottom - top),
                                    (int)rx, (int)ry);
                                    2 * (int)rx, 2 * (int)ry);
                        }
                    }
        });