< prev index next >
src/java.desktop/unix/classes/sun/awt/X11GraphicsConfig.java
Print this page
*** 131,141 ****
}
/**
* Return the graphics device associated with this configuration.
*/
! public GraphicsDevice getDevice() {
return screen;
}
/**
* Returns the visual id associated with this configuration.
--- 131,141 ----
}
/**
* Return the graphics device associated with this configuration.
*/
! public X11GraphicsDevice getDevice() {
return screen;
}
/**
* Returns the visual id associated with this configuration.
*** 254,264 ****
* the device, with X coordinates
* increasing to the right and Y coordinates increasing downwards.
* For image buffers, this Transform will be the Identity transform.
*/
public AffineTransform getDefaultTransform() {
! return new AffineTransform();
}
/**
*
* Returns a Transform that can be composed with the default Transform
--- 254,277 ----
* the device, with X coordinates
* increasing to the right and Y coordinates increasing downwards.
* For image buffers, this Transform will be the Identity transform.
*/
public AffineTransform getDefaultTransform() {
! double scale = getScale();
! return AffineTransform.getScaleInstance(scale, scale);
! }
!
! public int getScale() {
! return getDevice().getScaleFactor();
! }
!
! public int scaleUp(int x) {
! return x * getScale();
! }
!
! public int scaleDown(int x) {
! return x / getScale();
}
/**
*
* Returns a Transform that can be composed with the default Transform
*** 306,316 ****
static {
initIDs ();
}
public Rectangle getBounds() {
! return pGetBounds(screen.getScreen());
}
private native Rectangle pGetBounds(int screenNum);
private static class XDBECapabilities extends BufferCapabilities {
--- 319,336 ----
static {
initIDs ();
}
public Rectangle getBounds() {
! Rectangle rect = pGetBounds(screen.getScreen());
! if (getScale() != 1) {
! rect.x = scaleDown(rect.x);
! rect.y = scaleDown(rect.y);
! rect.width = scaleDown(rect.width);
! rect.height = scaleDown(rect.height);
! }
! return rect;
}
private native Rectangle pGetBounds(int screenNum);
private static class XDBECapabilities extends BufferCapabilities {
< prev index next >