55 public Rectangle getBounds() {
56 final Rectangle2D nativeBounds = nativeGetBounds(device.getCGDisplayID());
57 return nativeBounds.getBounds(); // does integer rounding
58 }
59
60 @Override
61 public ColorModel getColorModel() {
62 if (colorModel == null) {
63 colorModel = getColorModel(Transparency.OPAQUE);
64 }
65 return colorModel;
66 }
67
68 @Override
69 public ColorModel getColorModel(int transparency) {
70 throw new UnsupportedOperationException("not implemented");
71 }
72
73 @Override
74 public AffineTransform getDefaultTransform() {
75 return new AffineTransform();
76 }
77
78 @Override
79 public CGraphicsDevice getDevice() {
80 return device;
81 }
82
83 @Override
84 public AffineTransform getNormalizingTransform() {
85 double xscale = device.getXResolution() / 72.0;
86 double yscale = device.getYResolution() / 72.0;
87 return new AffineTransform(xscale, 0.0, 0.0, yscale, 0.0, 0.0);
88 }
89
90 /**
91 * Creates a new SurfaceData that will be associated with the given
92 * LWWindowPeer.
93 */
94 public abstract SurfaceData createSurfaceData(CPlatformView pView);
95
|
55 public Rectangle getBounds() {
56 final Rectangle2D nativeBounds = nativeGetBounds(device.getCGDisplayID());
57 return nativeBounds.getBounds(); // does integer rounding
58 }
59
60 @Override
61 public ColorModel getColorModel() {
62 if (colorModel == null) {
63 colorModel = getColorModel(Transparency.OPAQUE);
64 }
65 return colorModel;
66 }
67
68 @Override
69 public ColorModel getColorModel(int transparency) {
70 throw new UnsupportedOperationException("not implemented");
71 }
72
73 @Override
74 public AffineTransform getDefaultTransform() {
75 float scaleFactor = device.getScaleFactor();
76 return new AffineTransform(scaleFactor, 0, 0, scaleFactor, 0, 0);
77 }
78
79 @Override
80 public CGraphicsDevice getDevice() {
81 return device;
82 }
83
84 @Override
85 public AffineTransform getNormalizingTransform() {
86 double xscale = device.getXResolution() / 72.0;
87 double yscale = device.getYResolution() / 72.0;
88 return new AffineTransform(xscale, 0.0, 0.0, yscale, 0.0, 0.0);
89 }
90
91 /**
92 * Creates a new SurfaceData that will be associated with the given
93 * LWWindowPeer.
94 */
95 public abstract SurfaceData createSurfaceData(CPlatformView pView);
96
|