]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
FOP-2865; fix
authorChris Bowditch <cbowditch@apache.org>
Tue, 31 May 2022 16:06:10 +0000 (16:06 +0000)
committerChris Bowditch <cbowditch@apache.org>
Tue, 31 May 2022 16:06:10 +0000 (16:06 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1901463 13f79535-47bb-0310-9956-ffa450edef68

fop-core/src/main/java/org/apache/fop/svg/PDFTextPainter.java

index 3894f01e01502acefd69a45b48922ad1b2724136..e46642892d26890d1c764a987d8b5ff0e58448dc 100644 (file)
@@ -167,6 +167,7 @@ class PDFTextPainter extends NativeTextPainter {
         Paint strokePaint = tpi.strokePaint;
         Stroke stroke = tpi.strokeStroke;
         int fillAlpha = PDFGraphics2D.OPAQUE;
+        int strokeAlpha = PDFGraphics2D.OPAQUE;
         if (fillPaint instanceof Color) {
             Color col = (Color) fillPaint;
             pdf.applyColor(col, true);
@@ -175,13 +176,14 @@ class PDFTextPainter extends NativeTextPainter {
         if (strokePaint instanceof Color) {
             Color col = (Color) strokePaint;
             pdf.applyColor(col, false);
+            strokeAlpha = col.getAlpha();
         }
         pdf.applyPaint(fillPaint, true);
         pdf.applyStroke(stroke);
         if (strokePaint != null) {
             pdf.applyPaint(strokePaint, false);
         }
-        pdf.applyAlpha(fillAlpha, PDFGraphics2D.OPAQUE);
+        pdf.applyAlpha(fillAlpha, strokeAlpha);
     }
 
     @Override