src/java.desktop/share/classes/java/awt/Robot.java
changeset 53320 42037e059f2c
parent 52248 2e330da7cbf4
child 53677 01980f91eac1
equal deleted inserted replaced
53319:db7b41933563 53320:42037e059f2c
   392      * @param   x       X position of pixel
   392      * @param   x       X position of pixel
   393      * @param   y       Y position of pixel
   393      * @param   y       Y position of pixel
   394      * @return  Color of the pixel
   394      * @return  Color of the pixel
   395      */
   395      */
   396     public synchronized Color getPixelColor(int x, int y) {
   396     public synchronized Color getPixelColor(int x, int y) {
       
   397         checkScreenCaptureAllowed();
   397         AffineTransform tx = GraphicsEnvironment.
   398         AffineTransform tx = GraphicsEnvironment.
   398                 getLocalGraphicsEnvironment().getDefaultScreenDevice().
   399                 getLocalGraphicsEnvironment().getDefaultScreenDevice().
   399                 getDefaultConfiguration().getDefaultTransform();
   400                 getDefaultConfiguration().getDefaultTransform();
   400         x = (int) (x * tx.getScaleX());
   401         x = (int) (x * tx.getScaleX());
   401         y = (int) (y * tx.getScaleY());
   402         y = (int) (y * tx.getScaleY());