modules/swt/src/main/java/javafx/embed/swt/FXCanvas.java

Print this page

        

*** 515,525 **** double scaleFactor = getScaleFactor(); if (lastScaleFactor != scaleFactor) { resizePixelBuffer(scaleFactor); lastScaleFactor = scaleFactor; ! scenePeer.setPixelScaleFactor((float)scaleFactor); } // if we can't get the pixels, draw the bits that were there before IntBuffer buffer = pixelsBuf; int width = pWidth, height = pHeight; --- 515,525 ---- double scaleFactor = getScaleFactor(); if (lastScaleFactor != scaleFactor) { resizePixelBuffer(scaleFactor); lastScaleFactor = scaleFactor; ! scenePeer.setPixelScaleFactors((float)scaleFactor, (float)scaleFactor); } // if we can't get the pixels, draw the bits that were there before IntBuffer buffer = pixelsBuf; int width = pWidth, height = pHeight;
*** 1032,1042 **** scenePeer.setSize(pWidth, pHeight); } double scaleFactor = getScaleFactor(); resizePixelBuffer(scaleFactor); lastScaleFactor = scaleFactor; ! scenePeer.setPixelScaleFactor((float)scaleFactor); scenePeer.setDragStartListener((fxDragSource, dragAction) -> { Platform.runLater(() -> { DragSource dragSource = createDragSource(fxDragSource, dragAction); if (dragSource == null) { fxDragSource.dragDropEnd(null); --- 1032,1042 ---- scenePeer.setSize(pWidth, pHeight); } double scaleFactor = getScaleFactor(); resizePixelBuffer(scaleFactor); lastScaleFactor = scaleFactor; ! scenePeer.setPixelScaleFactors((float)scaleFactor, (float)scaleFactor); scenePeer.setDragStartListener((fxDragSource, dragAction) -> { Platform.runLater(() -> { DragSource dragSource = createDragSource(fxDragSource, dragAction); if (dragSource == null) { fxDragSource.dragDropEnd(null);