You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2016/12/13 15:38:52 UTC
svn commit: r1774038 -
/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
Author: tilman
Date: Tue Dec 13 15:38:52 2016
New Revision: 1774038
URL: http://svn.apache.org/viewvc?rev=1774038&view=rev
Log:
PDFBOX-3000: use softMask for non stroking paint, as suggested by Petr Slaby; use softMask for shading fill
Modified:
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java?rev=1774038&r1=1774037&r2=1774038&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java Tue Dec 13 15:38:52 2016
@@ -526,7 +526,9 @@ public class PageDrawer extends PDFGraph
// returns the non-stroking AWT Paint
private Paint getNonStrokingPaint() throws IOException
{
- return getPaint(getGraphicsState().getNonStrokingColor());
+ return applySoftMaskToPaint(
+ getPaint(getGraphicsState().getNonStrokingColor()),
+ getGraphicsState().getSoftMask());
}
// create a new stroke based on the current CTM and the current stroke
@@ -932,6 +934,7 @@ public class PageDrawer extends PDFGraph
}
Matrix ctm = getGraphicsState().getCurrentTransformationMatrix();
Paint paint = shading.toPaint(ctm);
+ paint = applySoftMaskToPaint(paint, getGraphicsState().getSoftMask());
graphics.setComposite(getGraphicsState().getNonStrokingJavaComposite());
graphics.setPaint(paint);