int x, y, w, h;
rfb.is.readFully(buf);
- Color pixel = new Color((buf[2] & 0xFF) << 16 |
- (buf[1] & 0xFF) << 8 |
- (buf[0] & 0xFF));
+ Color pixel = new Color(buf[2] & 0xFF,
+ buf[1] & 0xFF,
+ buf[0] & 0xFF);
memGraphics.setColor(pixel);
memGraphics.fillRect(rx, ry, rw, rh);
for (int j = 0; j < nSubrects; j++) {
rfb.is.readFully(buf);
- pixel = new Color((buf[2] & 0xFF) << 16 |
- (buf[1] & 0xFF) << 8 |
- (buf[0] & 0xFF));
+ pixel = new Color(buf[2] & 0xFF, buf[1] & 0xFF, buf[0] & 0xFF);
x = rx + rfb.is.readUnsignedShort();
y = ry + rfb.is.readUnsignedShort();
w = rfb.is.readUnsignedShort();
int x, y, w, h;
rfb.is.readFully(buf);
- Color pixel = new Color((buf[2] & 0xFF) << 16 |
- (buf[1] & 0xFF) << 8 |
- (buf[0] & 0xFF));
+ Color pixel = new Color(buf[2] & 0xFF,
+ buf[1] & 0xFF,
+ buf[0] & 0xFF);
memGraphics.setColor(pixel);
memGraphics.fillRect(rx, ry, rw, rh);
for (int j = 0; j < nSubrects; j++) {
rfb.is.readFully(buf);
- pixel = new Color((buf[2] & 0xFF) << 16 |
- (buf[1] & 0xFF) << 8 |
- (buf[0] & 0xFF));
+ pixel = new Color(buf[2] & 0xFF, buf[1] & 0xFF, buf[0] & 0xFF);
x = rx + rfb.is.readUnsignedByte();
y = ry + rfb.is.readUnsignedByte();
w = rfb.is.readUnsignedByte();
int rx = rfb.updateRectX, ry = rfb.updateRectY;
int rw = rfb.updateRectW, rh = rfb.updateRectH;
- Color bg = new Color(0), fg = new Color(0);
+ Color bg = new Color(0, 0, 0), fg = new Color(0, 0, 0);
for (int ty = ry; ty < ry + rh; ty += 16) {
// Read and draw the background if specified.
if ((subencoding & rfb.HextileBackgroundSpecified) != 0) {
rfb.is.readFully(buf, 0, 4);
- bg = new Color((buf[2] & 0xFF) << 16 |
- (buf[1] & 0xFF) << 8 |
- (buf[0] & 0xFF));
+ bg = new Color(buf[2] & 0xFF, buf[1] & 0xFF, buf[0] & 0xFF);
}
memGraphics.setColor(bg);
memGraphics.fillRect(tx, ty, tw, th);
// Read the foreground color if specified.
if ((subencoding & rfb.HextileForegroundSpecified) != 0) {
rfb.is.readFully(buf, 0, 4);
- fg = new Color((buf[2] & 0xFF) << 16 |
- (buf[1] & 0xFF) << 8 |
- (buf[0] & 0xFF));
+ fg = new Color(buf[2] & 0xFF, buf[1] & 0xFF, buf[0] & 0xFF);
}
// Done with this tile if there is no sub-rectangles.
if ((subencoding & rfb.HextileSubrectsColoured) != 0) {
for (int j = 0; j < nSubrects; j++) {
rfb.is.readFully(buf, 0, 4);
- fg = new Color((buf[2] & 0xFF) << 16 |
- (buf[1] & 0xFF) << 8 |
- (buf[0] & 0xFF));
+ fg = new Color(buf[2] & 0xFF,
+ buf[1] & 0xFF,
+ buf[0] & 0xFF);
b1 = rfb.is.readUnsignedByte();
b2 = rfb.is.readUnsignedByte();
sx = tx + (b1 >> 4);
if (comp_ctl == rfb.TightFill) {
byte[] buf = new byte[3];
rfb.is.readFully(buf);
- Color bg = new Color(0xFF000000 | (buf[0] & 0xFF) << 16 |
- (buf[1] & 0xFF) << 8 | (buf[2] & 0xFF));
+ Color bg = new Color(buf[0] & 0xFF, buf[1] & 0xFF, buf[2] & 0xFF);
memGraphics.setColor(bg);
memGraphics.fillRect(x, y, w, h);
scheduleRepaint(x, y, w, h);