Fix stretchy chat colors on Android 12.

This commit is contained in:
Alex Hart
2021-09-27 15:04:44 -03:00
committed by Cody Henthorne
parent e637f15a43
commit bad382e2f3
10 changed files with 173 additions and 90 deletions

View File

@@ -100,6 +100,10 @@ public final class RotatableGradientDrawable extends Drawable {
fillPaint.setShader(new LinearGradient(fillRect.left, fillRect.top, fillRect.right, fillRect.bottom, colors, positions, Shader.TileMode.CLAMP));
}
public @Nullable Shader getShader() {
return fillPaint.getShader();
}
private static Point cornerPrime(@NonNull Point origin, @NonNull Point corner, float degrees) {
return new Point(xPrime(origin, corner, Math.toRadians(degrees)), yPrime(origin, corner, Math.toRadians(degrees)));
}