modules/graphics/src/main/java/com/sun/prism/j2d/J2DPresentable.java

Print this page

        

@@ -112,11 +112,11 @@
                  * TODO: make sure the imgrep matches the Pixels.getNativeFormat()
                  * TODO: dirty region support
                  */
                 int w = getPhysicalWidth();
                 int h = getPhysicalHeight();
-                pixels = pixelSource.getUnusedPixels(w, h, 1.0f);
+                pixels = pixelSource.getUnusedPixels(w, h, 1.0f, 1.0f);
                 IntBuffer pixBuf = (IntBuffer) pixels.getPixels();
                 assert ib.hasArray();
                 System.arraycopy(ib.array(), 0, pixBuf.array(), 0, w*h);
                 return true;
             } else {

@@ -253,11 +253,17 @@
 
     public int getContentY() {
         return 0;
     }
 
-    public float getPixelScaleFactor() {
+    @Override
+    public float getPixelScaleFactorX() {
+        return 1.0f;
+    }
+
+    @Override
+    public float getPixelScaleFactorY() {
         return 1.0f;
     }
 
     public int getPhysicalWidth() {
         // If the buffer has not yet been created (typically that means