modules/graphics/src/main/java/com/sun/javafx/sg/prism/NGCanvas.java
Print this page
@@ -23,10 +23,11 @@
* questions.
*/
package com.sun.javafx.sg.prism;
+import com.sun.glass.ui.Screen;
import javafx.geometry.VPos;
import javafx.scene.text.Font;
import java.nio.IntBuffer;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;
@@ -309,10 +310,11 @@
private static Blend BLENDER = new MyBlend(Mode.SRC_OVER, null, null);
private GrowableDataBuffer thebuf;
+ private final float highestPixelScale;
private int tw, th;
private int cw, ch;
private RenderBuf cv;
private RenderBuf temp;
private RenderBuf clip;
@@ -346,10 +348,16 @@
static float TEMP_COORDS[] = new float[6];
private static Arc2D TEMP_ARC = new Arc2D();
private static RectBounds TEMP_RECTBOUNDS = new RectBounds();
public NGCanvas() {
+ float hPS = 1.0f;
+ for (Screen s : Screen.getScreens()) {
+ hPS = Math.max(s.getScale(), hPS);
+ }
+ highestPixelScale = hPS;
+
cv = new RenderBuf(InitType.PRESERVE_UPPER_LEFT);
temp = new RenderBuf(InitType.CLEAR);
clip = new RenderBuf(InitType.FILL_WHITE);
path = new Path2D();