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 2021/11/09 04:23:38 UTC

svn commit: r1894853 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java

Author: tilman
Date: Tue Nov  9 04:23:37 2021
New Revision: 1894853

URL: http://svn.apache.org/viewvc?rev=1894853&view=rev
Log:
PDFBOX-5314: offer method to write transparency group into a separate graphics device, as suggested by Henry Iguaro; closes #134

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=1894853&r1=1894852&r2=1894853&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 Nov  9 04:23:37 2021
@@ -1560,6 +1560,19 @@ public class PageDrawer extends PDFGraph
     @Override
     public void showTransparencyGroup(PDTransparencyGroup form) throws IOException
     {
+        showTransparencyGroupOnGraphics(form, graphics);
+    }
+
+    /**
+     * For advanced users, to extract the transparency group into a separate graphics device.
+     * 
+     * @param form
+     * @param graphics
+     * @throws IOException 
+     */
+    protected void showTransparencyGroupOnGraphics(PDTransparencyGroup form, Graphics2D graphics)
+        throws IOException
+    {
         if (isHiddenOCG(form.getOptionalContent()))
         {
             return;