aboutsummaryrefslogtreecommitdiffstats
path: root/java/com/tigervnc/vncviewer/BIPixelBuffer.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/com/tigervnc/vncviewer/BIPixelBuffer.java')
-rw-r--r--java/com/tigervnc/vncviewer/BIPixelBuffer.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/java/com/tigervnc/vncviewer/BIPixelBuffer.java b/java/com/tigervnc/vncviewer/BIPixelBuffer.java
index ae38302c..9612b36f 100644
--- a/java/com/tigervnc/vncviewer/BIPixelBuffer.java
+++ b/java/com/tigervnc/vncviewer/BIPixelBuffer.java
@@ -1,16 +1,16 @@
/* Copyright (C) 2012 Brian P. Hinz
* Copyright (C) 2012 D. R. Commander. All Rights Reserved.
- *
+ *
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this software; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
@@ -41,7 +41,7 @@ public class BIPixelBuffer extends PlatformPixelBuffer implements ImageObserver
super.updateColourMap();
createImage(width_, height_);
}
-
+
// resize() resizes the image, preserving the image data where possible.
public void resize(int w, int h) {
if (w == width() && h == height())
@@ -67,14 +67,14 @@ public class BIPixelBuffer extends PlatformPixelBuffer implements ImageObserver
Graphics2D graphics = (Graphics2D)image.getGraphics();
switch (format.depth) {
case 24:
- graphics.setColor(new Color(pix));
- graphics.fillRect(x, y, w, h);
+ graphics.setColor(new Color(pix));
+ graphics.fillRect(x, y, w, h);
break;
default:
Color color = new Color((0xff << 24) | (cm.getRed(pix) << 16) |
(cm.getGreen(pix) << 8) | (cm.getBlue(pix)));
- graphics.setColor(color);
- graphics.fillRect(x, y, w, h);
+ graphics.setColor(color);
+ graphics.fillRect(x, y, w, h);
break;
}
graphics.dispose();
@@ -83,7 +83,7 @@ public class BIPixelBuffer extends PlatformPixelBuffer implements ImageObserver
public void imageRect(int x, int y, int w, int h, Object pix) {
if (pix instanceof Image) {
Image img = (Image)pix;
- clip = new Rectangle(x, y, w, h);
+ clip = new Rectangle(x, y, w, h);
synchronized(clip) {
tk.prepareImage(img, -1, -1, this);
try {
@@ -91,7 +91,7 @@ public class BIPixelBuffer extends PlatformPixelBuffer implements ImageObserver
} catch (InterruptedException e) {
throw new Exception("Error decoding JPEG data");
}
- }
+ }
clip = null;
img.flush();
} else {
@@ -101,7 +101,7 @@ public class BIPixelBuffer extends PlatformPixelBuffer implements ImageObserver
bytes[i] = (byte)((int[])pix)[i];
pix = bytes;
}
- image.getSampleModel().setDataElements(x, y, w, h, pix, db);
+ image.getSampleModel().setDataElements(x, y, w, h, pix, db);
}
}
@@ -123,7 +123,7 @@ public class BIPixelBuffer extends PlatformPixelBuffer implements ImageObserver
if (clip != null) {
synchronized(clip) {
Graphics2D graphics = (Graphics2D)image.getGraphics();
- graphics.drawImage(img, clip.x, clip.y, clip.width, clip.height, null);
+ graphics.drawImage(img, clip.x, clip.y, clip.width, clip.height, null);
graphics.dispose();
clip.notify();
}