< prev index next >
src/java.desktop/unix/classes/sun/awt/X11/XRobotPeer.java
Print this page
@@ -62,11 +62,11 @@
// does nothing
}
@Override
public void mouseMove(int x, int y) {
- mouseMoveImpl(xgc, x, y);
+ mouseMoveImpl(xgc, xgc.scaleUp(x), xgc.scaleUp(y));
}
@Override
public void mousePress(int buttons) {
mousePressImpl(buttons);
@@ -93,19 +93,20 @@
}
@Override
public int getRGBPixel(int x, int y) {
int pixelArray[] = new int[1];
- getRGBPixelsImpl(xgc, x, y, 1, 1, pixelArray, isGtkSupported);
+ getRGBPixelsImpl(xgc, x, y, 1, 1, xgc.getScale(), pixelArray,
+ isGtkSupported);
return pixelArray[0];
}
@Override
public int [] getRGBPixels(Rectangle bounds) {
int pixelArray[] = new int[bounds.width*bounds.height];
getRGBPixelsImpl(xgc, bounds.x, bounds.y, bounds.width, bounds.height,
- pixelArray, isGtkSupported);
+ xgc.getScale(), pixelArray, isGtkSupported);
return pixelArray;
}
private static synchronized native void setup(int numberOfButtons, int[] buttonDownMasks);
@@ -116,7 +117,8 @@
private static synchronized native void keyPressImpl(int keycode);
private static synchronized native void keyReleaseImpl(int keycode);
private static synchronized native void getRGBPixelsImpl(X11GraphicsConfig xgc,
- int x, int y, int width, int height, int pixelArray[], boolean isGtkSupported);
+ int x, int y, int width, int height, int scale,
+ int pixelArray[], boolean isGtkSupported);
}
< prev index next >