From 2499876390e91512e9b234c8d740998248ff1342 Mon Sep 17 00:00:00 2001 From: Carlos Amengual Date: Thu, 8 Aug 2024 21:46:14 +0200 Subject: [PATCH] bridge: fix the handling of colors with percentage values in alpha channel --- .../src/main/java/io/sf/carte/echosvg/bridge/PaintServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/echosvg-bridge/src/main/java/io/sf/carte/echosvg/bridge/PaintServer.java b/echosvg-bridge/src/main/java/io/sf/carte/echosvg/bridge/PaintServer.java index 7e6470540..1d758d341 100644 --- a/echosvg-bridge/src/main/java/io/sf/carte/echosvg/bridge/PaintServer.java +++ b/echosvg-bridge/src/main/java/io/sf/carte/echosvg/bridge/PaintServer.java @@ -709,7 +709,7 @@ private static float resolveAlphaComponent(Value v) { case CSSPrimitiveValue.CSS_PERCENTAGE: f = v.getFloatValue(); f = (f > 100f) ? 100f : (f < 0f) ? 0f : f; - return f; + return f * 0.01f; case CSSPrimitiveValue.CSS_NUMBER: f = v.getFloatValue(); f = (f > 1f) ? 1f : (f < 0f) ? 0f : f;