# HG changeset patch # User one # Date 1346499228 -32400 # Node ID 0c08cdc4b572beba4c6891783c51b1c67f822584 # Parent 57eb5575e6c48527de1214700a2c11c914550f47 Create AbstractRenderer.java and Renderer change to Interface diff -r 57eb5575e6c4 -r 0c08cdc4b572 src/main/java/com/glavsoft/drawing/AbstructRenderer.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/com/glavsoft/drawing/AbstructRenderer.java Sat Sep 01 20:33:48 2012 +0900 @@ -0,0 +1,299 @@ +package com.glavsoft.drawing; + +import java.util.Arrays; + +import com.glavsoft.exceptions.TransportException; +import com.glavsoft.rfb.encoding.PixelFormat; +import com.glavsoft.rfb.encoding.decoder.FramebufferUpdateRectangle; +import com.glavsoft.transport.Reader; + +public abstract class AbstructRenderer implements Renderer { + + protected Reader reader; + + public abstract void drawJpegImage(byte[] bytes, int offset, + int jpegBufferLength, FramebufferUpdateRectangle rect); + + protected int width; + protected int height; + protected int bytesPerPixel; + protected int bytesPerPixelSignificant; + protected int[] pixels; + protected SoftCursor cursor; + protected PixelFormat pixelFormat; + private ColorDecoder colorDecoder; + + protected void init(Reader reader, int width, int height, PixelFormat pixelFormat) { + this.reader = reader; + this.width = width; + this.height = height; + initPixelFormat(pixelFormat); + pixels = new int[width * height]; + Arrays.fill(pixels, 0); + } + + public synchronized void initPixelFormat(PixelFormat pixelFormat) { + this.pixelFormat = pixelFormat; + bytesPerPixel = pixelFormat.bitsPerPixel / 8; + bytesPerPixelSignificant = + 24 == pixelFormat.depth && 32 == pixelFormat.bitsPerPixel ? 3 : bytesPerPixel; + colorDecoder = new ColorDecoder(pixelFormat); + } + + /** + * Draw byte array bitmap data + * + * @param bytes bitmap data + * @param x bitmap x position + * @param y bitmap y position + * @param width bitmap width + * @param height bitmap height + */ + public void drawBytes(byte[] bytes, int x, int y, int width, int height) { + int i = 0; + for (int ly = y; ly < y + height; ++ly) { + int end = ly * this.width + x + width; + for (int pixelsOffset = ly * this.width + x; pixelsOffset < end; ++pixelsOffset) { + pixels[pixelsOffset] = getPixelColor(bytes, i); + i += bytesPerPixel; + } + } + } + + /** + * Draw byte array bitmap data (for ZRLE) + */ + public synchronized int drawCompactBytes(byte[] bytes, int offset, int x, int y, int width, int height) { + int i = offset; + for (int ly = y; ly < y + height; ++ly) { + int end = ly * this.width + x + width; + for (int pixelsOffset = ly * this.width + x; pixelsOffset < end; ++pixelsOffset) { + pixels[pixelsOffset] = getCompactPixelColor(bytes, i); + i += bytesPerPixelSignificant; + } + } + return i - offset; + } + + /** + * Draw int (colors) array bitmap data (for ZRLE) + */ + public synchronized void drawColoredBitmap(int[] colors, int x, int y, int width, int height) { + int i = 0; + for (int ly = y; ly < y + height; ++ly) { + int end = ly * this.width + x + width; + for (int pixelsOffset = ly * this.width + x; pixelsOffset < end; ++pixelsOffset) { + pixels[pixelsOffset] = colors[i++]; + } + } + } + + /** + * Draw byte array bitmap data (for Tight) + */ + public synchronized int drawTightBytes(byte[] bytes, int offset, int x, int y, int width, int height) { + int i = offset; + for (int ly = y; ly < y + height; ++ly) { + int end = ly * this.width + x + width; + for (int pixelsOffset = ly * this.width + x; pixelsOffset < end; ++pixelsOffset) { + pixels[pixelsOffset] = colorDecoder.getTightColor(bytes, i); + i += bytesPerPixelSignificant; + } + } + return i - offset; + } + + /** + * Draw byte array bitmap data (from array with plain RGB color components. Assumed: rrrrrrrr gggggggg bbbbbbbb) + */ + public synchronized void drawUncaliberedRGBLine(byte[] bytes, int x, int y, int width) { + int end = y * this.width + x + width; + for (int i=3, pixelsOffset = y * this.width + x; pixelsOffset < end; ++pixelsOffset) { + pixels[pixelsOffset] = +// (0xff & bytes[i++]) << 16 | +// (0xff & bytes[i++]) << 8 | +// 0xff & bytes[i++]; + (0xff & 255 * (colorDecoder.redMax & bytes[i++]) / colorDecoder.redMax) << 16 | + (0xff & 255 * (colorDecoder.greenMax & bytes[i++]) / colorDecoder.greenMax) << 8 | + 0xff & 255 * (colorDecoder.blueMax & bytes[i++]) / colorDecoder.blueMax; + } + } + + /** + * Draw paletted byte array bitmap data + * + * @param buffer bitmap data + * @param rect bitmap location and dimensions + * @param palette colour palette + */ + public synchronized void drawBytesWithPalette(byte[] buffer, FramebufferUpdateRectangle rect, + int[] palette) { + // 2 colors + if (palette.length == 2) { + int dx, dy, n; + int i = rect.y * this.width + rect.x; + int rowBytes = (rect.width + 7) / 8; + byte b; + + for (dy = 0; dy < rect.height; dy++) { + for (dx = 0; dx < rect.width / 8; dx++) { + b = buffer[dy * rowBytes + dx]; + for (n = 7; n >= 0; n--) { + pixels[i++] = palette[b >> n & 1]; + } + } + for (n = 7; n >= 8 - rect.width % 8; n--) { + pixels[i++] = palette[buffer[dy * rowBytes + dx] >> n & 1]; + } + i += this.width- rect.width; + } + } else { + // 3..255 colors (assuming bytesPixel == 4). + int i = 0; + for (int ly = rect.y; ly < rect.y + rect.height; ++ly) { + for (int lx = rect.x; lx < rect.x + rect.width; ++lx) { + int pixelsOffset = ly * this.width + lx; + pixels[pixelsOffset] = palette[buffer[i++] & 0xFF]; + } + } + } + + } + + /** + * Copy rectangle region from one position to another. Regions may be overlapped. + * + * @param srcX source rectangle x position + * @param srcY source rectangle y position + * @param dstRect destination rectangle + */ + public synchronized void copyRect(int srcX, int srcY, FramebufferUpdateRectangle dstRect) { + int startSrcY, endSrcY, dstY, deltaY; + if (srcY > dstRect.y) { + startSrcY = srcY; + endSrcY = srcY + dstRect.height; + dstY = dstRect.y; + deltaY = +1; + } else { + startSrcY = srcY + dstRect.height - 1; + endSrcY = srcY -1; + dstY = dstRect.y + dstRect.height - 1; + deltaY = -1; + } + for (int y = startSrcY; y != endSrcY; y += deltaY) { + System.arraycopy(pixels, y * width + srcX, + pixels, dstY * width + dstRect.x, dstRect.width); + dstY += deltaY; + } + } + + /** + * Fill rectangle region with specified colour + * + * @param color colour to fill with + * @param rect rectangle region posions and dimensions + */ + public void fillRect(int color, FramebufferUpdateRectangle rect) { + fillRect(color, rect.x, rect.y, rect.width, rect.height); + } + + /** + * Fill rectangle region with specified colour + * + * @param color colour to fill with + * @param x rectangle x position + * @param y rectangle y position + * @param width rectangle width + * @param height rectangle height + */ + public synchronized void fillRect(int color, int x, int y, int width, int height) { + int sy = y * this.width + x; + int ey = sy + height * this.width; + for (int i = sy; i < ey; i += this.width) { + Arrays.fill(pixels, i, i + width, color); + } + } + + /** + * Reads color bytes (PIXEL) from reader, returns int combined RGB + * value consisting of the red component in bits 16-23, the green component + * in bits 8-15, and the blue component in bits 0-7. May be used directly for + * creation awt.Color object + */ + public int readPixelColor(Reader reader) throws TransportException { + return colorDecoder.readColor(reader); + } + + public int readTightPixelColor(Reader reader) throws TransportException { + return colorDecoder.readTightColor(reader); + } + + public ColorDecoder getColorDecoder() { + return colorDecoder; + } + + public int getCompactPixelColor(byte[] bytes, int offset) { + return colorDecoder.getCompactColor(bytes, offset); + } + + public int getPixelColor(byte[] bytes, int offset) { + return colorDecoder.getColor(bytes, offset); + } + + public int getBytesPerPixel() { + return bytesPerPixel; + } + + public int getBytesPerPixelSignificant() { + return bytesPerPixelSignificant; + } + + public void fillColorBitmapWithColor(int[] bitmapData, int decodedOffset, int rlength, int color) { + while (rlength-- > 0) { + bitmapData[decodedOffset++] = color; + } + } + + /** + * Width of rendered image + * + * @return width + */ + public int getWidth() { + return width; + } + + /** + * Height of rendered image + * + * @return height + */ + public int getHeight() { + return height; + } + + /** + * Read and decode cursor image + * + * @param rect new cursor hot point position and cursor dimensions + * @throws TransportException + */ + public void createCursor(int[] cursorPixels, FramebufferUpdateRectangle rect) + throws TransportException { + synchronized (cursor) { + cursor.createCursor(cursorPixels, rect.x, rect.y, rect.width, rect.height); + } + } + + /** + * Read and decode new cursor position + * + * @param rect cursor position + */ + public void decodeCursorPosition(FramebufferUpdateRectangle rect) { + synchronized (cursor) { + cursor.updatePosition(rect.x, rect.y); + } + } + +} diff -r 57eb5575e6c4 -r 0c08cdc4b572 src/main/java/com/glavsoft/drawing/Renderer.java --- a/src/main/java/com/glavsoft/drawing/Renderer.java Sat Sep 01 20:08:03 2012 +0900 +++ b/src/main/java/com/glavsoft/drawing/Renderer.java Sat Sep 01 20:33:48 2012 +0900 @@ -36,293 +36,53 @@ * * @author dime @ tightvnc.com */ -public abstract class Renderer { - - protected Reader reader; - - public abstract void drawJpegImage(byte[] bytes, int offset, - int jpegBufferLength, FramebufferUpdateRectangle rect); +public interface Renderer { - protected int width; - protected int height; - protected int bytesPerPixel; - protected int bytesPerPixelSignificant; - protected int[] pixels; - protected SoftCursor cursor; - protected PixelFormat pixelFormat; - private ColorDecoder colorDecoder; - - protected void init(Reader reader, int width, int height, PixelFormat pixelFormat) { - this.reader = reader; - this.width = width; - this.height = height; - initPixelFormat(pixelFormat); - pixels = new int[width * height]; - Arrays.fill(pixels, 0); - } + void copyRect(int srcX, int srcY, FramebufferUpdateRectangle rect); - public synchronized void initPixelFormat(PixelFormat pixelFormat) { - this.pixelFormat = pixelFormat; - bytesPerPixel = pixelFormat.bitsPerPixel / 8; - bytesPerPixelSignificant = - 24 == pixelFormat.depth && 32 == pixelFormat.bitsPerPixel ? 3 : bytesPerPixel; - colorDecoder = new ColorDecoder(pixelFormat); - } + int readPixelColor(Reader reader) throws TransportException; - /** - * Draw byte array bitmap data - * - * @param bytes bitmap data - * @param x bitmap x position - * @param y bitmap y position - * @param width bitmap width - * @param height bitmap height - */ - public void drawBytes(byte[] bytes, int x, int y, int width, int height) { - int i = 0; - for (int ly = y; ly < y + height; ++ly) { - int end = ly * this.width + x + width; - for (int pixelsOffset = ly * this.width + x; pixelsOffset < end; ++pixelsOffset) { - pixels[pixelsOffset] = getPixelColor(bytes, i); - i += bytesPerPixel; - } - } - } + void fillRect(int i, int tileX, int tileY, int tileWidth, int tileHeight); + + int getBytesPerPixel(); - /** - * Draw byte array bitmap data (for ZRLE) - */ - public synchronized int drawCompactBytes(byte[] bytes, int offset, int x, int y, int width, int height) { - int i = offset; - for (int ly = y; ly < y + height; ++ly) { - int end = ly * this.width + x + width; - for (int pixelsOffset = ly * this.width + x; pixelsOffset < end; ++pixelsOffset) { - pixels[pixelsOffset] = getCompactPixelColor(bytes, i); - i += bytesPerPixelSignificant; - } - } - return i - offset; - } + void drawBytes(byte[] bytes, int x, int y, int width, int height); - /** - * Draw int (colors) array bitmap data (for ZRLE) - */ - public synchronized void drawColoredBitmap(int[] colors, int x, int y, int width, int height) { - int i = 0; - for (int ly = y; ly < y + height; ++ly) { - int end = ly * this.width + x + width; - for (int pixelsOffset = ly * this.width + x; pixelsOffset < end; ++pixelsOffset) { - pixels[pixelsOffset] = colors[i++]; - } - } - } + int getPixelColor(byte[] buffer, int i); + + void createCursor(int[] cursorPixels, FramebufferUpdateRectangle rect) throws TransportException; - /** - * Draw byte array bitmap data (for Tight) - */ - public synchronized int drawTightBytes(byte[] bytes, int offset, int x, int y, int width, int height) { - int i = offset; - for (int ly = y; ly < y + height; ++ly) { - int end = ly * this.width + x + width; - for (int pixelsOffset = ly * this.width + x; pixelsOffset < end; ++pixelsOffset) { - pixels[pixelsOffset] = colorDecoder.getTightColor(bytes, i); - i += bytesPerPixelSignificant; - } - } - return i - offset; - } + void fillRect(int color, FramebufferUpdateRectangle rect); - /** - * Draw byte array bitmap data (from array with plain RGB color components. Assumed: rrrrrrrr gggggggg bbbbbbbb) - */ - public synchronized void drawUncaliberedRGBLine(byte[] bytes, int x, int y, int width) { - int end = y * this.width + x + width; - for (int i=3, pixelsOffset = y * this.width + x; pixelsOffset < end; ++pixelsOffset) { - pixels[pixelsOffset] = -// (0xff & bytes[i++]) << 16 | -// (0xff & bytes[i++]) << 8 | -// 0xff & bytes[i++]; - (0xff & 255 * (colorDecoder.redMax & bytes[i++]) / colorDecoder.redMax) << 16 | - (0xff & 255 * (colorDecoder.greenMax & bytes[i++]) / colorDecoder.greenMax) << 8 | - 0xff & 255 * (colorDecoder.blueMax & bytes[i++]) / colorDecoder.blueMax; - } - } + int getBytesPerPixelSignificant(); - /** - * Draw paletted byte array bitmap data - * - * @param buffer bitmap data - * @param rect bitmap location and dimensions - * @param palette colour palette - */ - public synchronized void drawBytesWithPalette(byte[] buffer, FramebufferUpdateRectangle rect, - int[] palette) { - // 2 colors - if (palette.length == 2) { - int dx, dy, n; - int i = rect.y * this.width + rect.x; - int rowBytes = (rect.width + 7) / 8; - byte b; + int readTightPixelColor(Reader reader) throws TransportException; - for (dy = 0; dy < rect.height; dy++) { - for (dx = 0; dx < rect.width / 8; dx++) { - b = buffer[dy * rowBytes + dx]; - for (n = 7; n >= 0; n--) { - pixels[i++] = palette[b >> n & 1]; - } - } - for (n = 7; n >= 8 - rect.width % 8; n--) { - pixels[i++] = palette[buffer[dy * rowBytes + dx] >> n & 1]; - } - i += this.width- rect.width; - } - } else { - // 3..255 colors (assuming bytesPixel == 4). - int i = 0; - for (int ly = rect.y; ly < rect.y + rect.height; ++ly) { - for (int lx = rect.x; lx < rect.x + rect.width; ++lx) { - int pixelsOffset = ly * this.width + lx; - pixels[pixelsOffset] = palette[buffer[i++] & 0xFF]; - } - } - } + int drawTightBytes(byte[] buffer, int i, int x, int y, int width, + int height); - } + void drawBytesWithPalette(byte[] buffer, FramebufferUpdateRectangle rect, + int[] palette); - /** - * Copy rectangle region from one position to another. Regions may be overlapped. - * - * @param srcX source rectangle x position - * @param srcY source rectangle y position - * @param dstRect destination rectangle - */ - public synchronized void copyRect(int srcX, int srcY, FramebufferUpdateRectangle dstRect) { - int startSrcY, endSrcY, dstY, deltaY; - if (srcY > dstRect.y) { - startSrcY = srcY; - endSrcY = srcY + dstRect.height; - dstY = dstRect.y; - deltaY = +1; - } else { - startSrcY = srcY + dstRect.height - 1; - endSrcY = srcY -1; - dstY = dstRect.y + dstRect.height - 1; - deltaY = -1; - } - for (int y = startSrcY; y != endSrcY; y += deltaY) { - System.arraycopy(pixels, y * width + srcX, - pixels, dstY * width + dstRect.x, dstRect.width); - dstY += deltaY; - } - } + ColorDecoder getColorDecoder(); - /** - * Fill rectangle region with specified colour - * - * @param color colour to fill with - * @param rect rectangle region posions and dimensions - */ - public void fillRect(int color, FramebufferUpdateRectangle rect) { - fillRect(color, rect.x, rect.y, rect.width, rect.height); - } + void drawUncaliberedRGBLine(byte[] thisRow, int x, int i, int width); - /** - * Fill rectangle region with specified colour - * - * @param color colour to fill with - * @param x rectangle x position - * @param y rectangle y position - * @param width rectangle width - * @param height rectangle height - */ - public synchronized void fillRect(int color, int x, int y, int width, int height) { - int sy = y * this.width + x; - int ey = sy + height * this.width; - for (int i = sy; i < ey; i += this.width) { - Arrays.fill(pixels, i, i + width, color); - } - } + void drawJpegImage(byte[] bytes, int i, int jpegBufferLength, + FramebufferUpdateRectangle rect); - /** - * Reads color bytes (PIXEL) from reader, returns int combined RGB - * value consisting of the red component in bits 16-23, the green component - * in bits 8-15, and the blue component in bits 0-7. May be used directly for - * creation awt.Color object - */ - public int readPixelColor(Reader reader) throws TransportException { - return colorDecoder.readColor(reader); - } - - public int readTightPixelColor(Reader reader) throws TransportException { - return colorDecoder.readTightColor(reader); - } - - public ColorDecoder getColorDecoder() { - return colorDecoder; - } + int getCompactPixelColor(byte[] bytes, int index); - public int getCompactPixelColor(byte[] bytes, int offset) { - return colorDecoder.getCompactColor(bytes, offset); - } - - public int getPixelColor(byte[] bytes, int offset) { - return colorDecoder.getColor(bytes, offset); - } - - public int getBytesPerPixel() { - return bytesPerPixel; - } - - public int getBytesPerPixelSignificant() { - return bytesPerPixelSignificant; - } - - public void fillColorBitmapWithColor(int[] bitmapData, int decodedOffset, int rlength, int color) { - while (rlength-- > 0) { - bitmapData[decodedOffset++] = color; - } - } + void fillColorBitmapWithColor(int[] decodedBitmap, int decodedOffset, + int rlength, int color); - /** - * Width of rendered image - * - * @return width - */ - public int getWidth() { - return width; - } - - /** - * Height of rendered image - * - * @return height - */ - public int getHeight() { - return height; - } + void drawColoredBitmap(int[] decodedBitmap, int tileX, int tileY, + int tileWidth, int tileHeight); - /** - * Read and decode cursor image - * - * @param rect new cursor hot point position and cursor dimensions - * @throws TransportException - */ - public void createCursor(int[] cursorPixels, FramebufferUpdateRectangle rect) - throws TransportException { - synchronized (cursor) { - cursor.createCursor(cursorPixels, rect.x, rect.y, rect.width, rect.height); - } - } + int drawCompactBytes(byte[] bytes, int offset, int tileX, int tileY, + int tileWidth, int tileHeight); - /** - * Read and decode new cursor position - * - * @param rect cursor position - */ - public void decodeCursorPosition(FramebufferUpdateRectangle rect) { - synchronized (cursor) { - cursor.updatePosition(rect.x, rect.y); - } - } + void decodeCursorPosition(FramebufferUpdateRectangle rect); + } \ No newline at end of file diff -r 57eb5575e6c4 -r 0c08cdc4b572 src/main/java/com/glavsoft/rfb/encoding/decoder/TightDecoder.java --- a/src/main/java/com/glavsoft/rfb/encoding/decoder/TightDecoder.java Sat Sep 01 20:08:03 2012 +0900 +++ b/src/main/java/com/glavsoft/rfb/encoding/decoder/TightDecoder.java Sat Sep 01 20:33:48 2012 +0900 @@ -64,7 +64,7 @@ @Override public void decode(Reader reader, Renderer renderer, FramebufferUpdateRectangle rect) throws TransportException { - int bytesPerPixel = renderer.getBytesPerPixelSignificant(); + int bytesPerPixel = renderer.getBytesPerPixel(); /** * bits @@ -112,7 +112,7 @@ if ((compControl & FILTER_ID_MASK) > 0) { // filter byte presence filterId = reader.readUInt8(); } - int bytesPerCPixel = renderer.getBytesPerPixelSignificant(); + int bytesPerCPixel = renderer.getBytesPerPixel(); int lengthCurrentbpp = bytesPerCPixel * rect.width * rect.height; byte [] buffer; switch (filterId) { diff -r 57eb5575e6c4 -r 0c08cdc4b572 src/main/java/com/glavsoft/rfb/protocol/NullRenderer.java --- a/src/main/java/com/glavsoft/rfb/protocol/NullRenderer.java Sat Sep 01 20:08:03 2012 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/NullRenderer.java Sat Sep 01 20:33:48 2012 +0900 @@ -1,9 +1,12 @@ package com.glavsoft.rfb.protocol; +import com.glavsoft.drawing.ColorDecoder; import com.glavsoft.drawing.Renderer; +import com.glavsoft.exceptions.TransportException; import com.glavsoft.rfb.encoding.decoder.FramebufferUpdateRectangle; +import com.glavsoft.transport.Reader; -public class NullRenderer extends Renderer { +public class NullRenderer implements Renderer { @Override public void drawJpegImage(byte[] bytes, int offset, int jpegBufferLength, @@ -12,4 +15,123 @@ } + @Override + public void copyRect(int srcX, int srcY, FramebufferUpdateRectangle rect) { + // TODO Auto-generated method stub + + } + + @Override + public int readPixelColor(Reader reader) throws TransportException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void fillRect(int i, int tileX, int tileY, int tileWidth, + int tileHeight) { + // TODO Auto-generated method stub + + } + + @Override + public int getBytesPerPixel() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void drawBytes(byte[] bytes, int x, int y, int width, int height) { + // TODO Auto-generated method stub + + } + + @Override + public int getPixelColor(byte[] buffer, int i) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void createCursor(int[] cursorPixels, FramebufferUpdateRectangle rect) { + // TODO Auto-generated method stub + + } + + @Override + public void fillRect(int color, FramebufferUpdateRectangle rect) { + // TODO Auto-generated method stub + + } + + @Override + public int getBytesPerPixelSignificant() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int readTightPixelColor(Reader reader) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int drawTightBytes(byte[] buffer, int i, int x, int y, int width, + int height) { + return 0; + } + + @Override + public void drawBytesWithPalette(byte[] buffer, + FramebufferUpdateRectangle rect, int[] palette) { + // TODO Auto-generated method stub + + } + + @Override + public ColorDecoder getColorDecoder() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void drawUncaliberedRGBLine(byte[] thisRow, int x, int i, int width) { + // TODO Auto-generated method stub + + } + + @Override + public int getCompactPixelColor(byte[] bytes, int index) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void fillColorBitmapWithColor(int[] decodedBitmap, + int decodedOffset, int rlength, int color) { + // TODO Auto-generated method stub + + } + + @Override + public void drawColoredBitmap(int[] decodedBitmap, int tileX, int tileY, + int tileWidth, int tileHeight) { + // TODO Auto-generated method stub + + } + + @Override + public int drawCompactBytes(byte[] bytes, int offset, int tileX, int tileY, + int tileWidth, int tileHeight) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void decodeCursorPosition(FramebufferUpdateRectangle rect) { + // TODO Auto-generated method stub + + } + } diff -r 57eb5575e6c4 -r 0c08cdc4b572 src/viewer_swing/java/com/glavsoft/viewer/swing/RendererImpl.java --- a/src/viewer_swing/java/com/glavsoft/viewer/swing/RendererImpl.java Sat Sep 01 20:08:03 2012 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/RendererImpl.java Sat Sep 01 20:33:48 2012 +0900 @@ -24,6 +24,7 @@ package com.glavsoft.viewer.swing; +import com.glavsoft.drawing.AbstructRenderer; import com.glavsoft.drawing.Renderer; import com.glavsoft.rfb.encoding.PixelFormat; import com.glavsoft.rfb.encoding.decoder.FramebufferUpdateRectangle; @@ -36,7 +37,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -public class RendererImpl extends Renderer implements ImageObserver { +public class RendererImpl extends AbstructRenderer implements ImageObserver { private final Image offscreanImage; public RendererImpl(Reader reader, int width, int height, PixelFormat pixelFormat) { if (0 == width) width = 1;