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

Commit 90c79194 authored by Matt Casey's avatar Matt Casey
Browse files

Fix corner arc computation.

Arc oval should be twice the radius.

Bug: 134506701
Test: Validated that arc drawn was correct on screen. Looked great.
Change-Id: I20b634db644e8802463edd475bf2c81814941a54
parent 10b9def7
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -53,11 +53,12 @@ public final class CircularCornerPathRenderer extends CornerPathRenderer {
                break;
                break;
            case TOP_RIGHT:
            case TOP_RIGHT:
                mPath.moveTo(mWidth, mCornerRadiusTop);
                mPath.moveTo(mWidth, mCornerRadiusTop);
                mPath.arcTo(mWidth - mCornerRadiusTop, 0, mWidth, mCornerRadiusTop, 0, -90, true);
                mPath.arcTo(mWidth - mCornerRadiusTop * 2, 0, mWidth, mCornerRadiusTop * 2, 0, -90,
                        true);
                break;
                break;
            case TOP_LEFT:
            case TOP_LEFT:
                mPath.moveTo(mCornerRadiusTop, 0);
                mPath.moveTo(mCornerRadiusTop, 0);
                mPath.arcTo(0, 0, mCornerRadiusTop, mCornerRadiusTop, 270, -90, true);
                mPath.arcTo(0, 0, mCornerRadiusTop * 2, mCornerRadiusTop * 2, 270, -90, true);
                break;
                break;
        }
        }
        return mPath;
        return mPath;