mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Trying to fix the antialiasing test failure in ui-test-app
This commit is contained in:
@@ -173,7 +173,7 @@ public class BorderDrawable extends ColorDrawable {
|
|||||||
|
|
||||||
// We will inset background colors and images so antialiasing will not color pixels outside the border.
|
// We will inset background colors and images so antialiasing will not color pixels outside the border.
|
||||||
// If the border is transparent we will backoff less, and we will not backoff more than half a pixel or half the border width.
|
// If the border is transparent we will backoff less, and we will not backoff more than half a pixel or half the border width.
|
||||||
float normalizedBorderAlpha = Color.alpha(this.borderColor) / 255;
|
float normalizedBorderAlpha = ((float)Color.alpha(this.borderColor)) / 255.0f;
|
||||||
float backoffAntialias = Math.min(0.5f, halfBorderWidth) * normalizedBorderAlpha;
|
float backoffAntialias = Math.min(0.5f, halfBorderWidth) * normalizedBorderAlpha;
|
||||||
RectF backgroundBoundsF = new RectF(bounds.left + backoffAntialias, bounds.top + backoffAntialias, bounds.right - backoffAntialias, bounds.bottom - backoffAntialias);
|
RectF backgroundBoundsF = new RectF(bounds.left + backoffAntialias, bounds.top + backoffAntialias, bounds.right - backoffAntialias, bounds.bottom - backoffAntialias);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user