From 18d1f122458dbab3fb38c4bd73bfa69a22b5dec0 Mon Sep 17 00:00:00 2001 From: "Hugh.C" Date: Mon, 22 Feb 2021 16:10:32 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-47816=20=E5=9C=A8=E6=9F=90=E4=BA=9B?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E3=80=81=E5=AD=97=E5=8F=B7=E4=B8=8B=EF=BC=8C?= =?UTF-8?q?=E5=AF=BC=E5=87=BApdf=E6=96=87=E5=AD=97=E4=BC=9A=E6=9C=89?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E9=BB=91=E8=BE=B9=EF=BC=88REPORT-29126=20?= =?UTF-8?q?=E6=94=B9=E5=8A=A8=E5=AF=BC=E8=87=B4=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/lowagie/text/pdf/PdfGraphics2D.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/fine-itext-old/src/main/java/com/fr/third/com/lowagie/text/pdf/PdfGraphics2D.java b/fine-itext-old/src/main/java/com/fr/third/com/lowagie/text/pdf/PdfGraphics2D.java index b69457ff6..f46246079 100644 --- a/fine-itext-old/src/main/java/com/fr/third/com/lowagie/text/pdf/PdfGraphics2D.java +++ b/fine-itext-old/src/main/java/com/fr/third/com/lowagie/text/pdf/PdfGraphics2D.java @@ -434,22 +434,22 @@ public class PdfGraphics2D extends Graphics2D { if (strokeWidth != 1) { cb.setLineWidth(strokeWidth); oldStroke = new BasicStroke(strokeWidth); - if(realPaint instanceof Color){ - Color color = (Color)realPaint; - int alpha = color.getAlpha(); - if (alpha != currentStrokeGState) { - currentStrokeGState = alpha; - PdfGState gs = strokeGState[alpha]; - if (gs == null) { - gs = new PdfGState(); - gs.setStrokeOpacity(alpha / 255f); - strokeGState[alpha] = gs; - } - cb.setGState(gs); + } + if (realPaint instanceof Color) { + Color color = (Color) realPaint; + int alpha = color.getAlpha(); + if (alpha != currentStrokeGState) { + currentStrokeGState = alpha; + PdfGState gs = strokeGState[alpha]; + if (gs == null) { + gs = new PdfGState(); + gs.setStrokeOpacity(alpha / 255f); + strokeGState[alpha] = gs; } - paintStroke = color; - cb.setColorStroke(color); + cb.setGState(gs); } + paintStroke = color; + cb.setColorStroke(color); } restoreTextRenderingMode = true; }