From d58d49dd23afc14b1b89b0f0389cfa623f1c7ce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Lehmk=C3=BChler?= Date: Sun, 2 Feb 2014 17:01:10 +0000 Subject: [PATCH] PDFBOX-1442: clear cached paint value git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1563662 13f79535-47bb-0310-9956-ffa450edef68 --- .../pdfbox/pdmodel/graphics/color/PDColorState.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDColorState.java b/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDColorState.java index ab54aa1366b..23f417a5ded 100644 --- a/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDColorState.java +++ b/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDColorState.java @@ -281,8 +281,9 @@ public PDColorSpace getColorSpace() public void setColorSpace(PDColorSpace value) { colorSpace = value; - // Clear color cache and current pattern + // Clear color/paint cache and current pattern color = null; + paint = null; pattern = null; } @@ -314,8 +315,9 @@ public COSArray getCOSColorSpaceValue() public void setColorSpaceValue(float[] value) { colorSpaceValue.setFloatArray(value); - // Clear color cache and current pattern + // Clear color/paint and current pattern color = null; + paint = null; pattern = null; } @@ -337,8 +339,9 @@ public PDPatternResources getPattern() public void setPattern(PDPatternResources patternValue) { pattern = patternValue; - // Clear color cache + // Clear color/paint cache color = null; + paint = null; } }