Author: tilman
Date: Sat Mar 25 04:36:59 2023
New Revision: 1908702

URL: http://svn.apache.org/viewvc?rev=1908702&view=rev
Log:
PDFBOX-5581: make getSubsampling() protected, as suggested by Liu

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=1908702&r1=1908701&r2=1908702&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
 Sat Mar 25 04:36:59 2023
@@ -1264,15 +1264,15 @@ public class PageDrawer extends PDFGraph
     }
 
     /**
-     * Calculated the subsampling frequency for a given PDImage based on the 
current transformation
-     * and its calculated transform
+     * Calculates the subsampling frequency for a given PDImage based on the 
current transformation
+     * and its calculated transform. Extend this method if you want to use 
your own strategy.
      *
      * @param pdImage PDImage to be drawn
      * @param at Transform that will be applied to the image when drawing
      * @return The rounded-down ratio of image pixels to drawn pixels. 
Returned value will always be
      * >=1.
      */
-    private int getSubsampling(PDImage pdImage, AffineTransform at)
+    protected int getSubsampling(PDImage pdImage, AffineTransform at)
     {
         // calculate subsampling according to the resulting image size
         double scale = Math.abs(at.getDeterminant() * xform.getDeterminant());


Reply via email to