/* */ package NET.worlds.console; /* */ /* */ import java.awt.Canvas; /* */ import java.awt.Container; /* */ import java.awt.Dimension; /* */ import java.awt.Frame; /* */ import java.awt.Point; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class ScapePicCanvas /* */ extends Canvas /* */ { /* */ private static final long serialVersionUID = 927951584800056826L; /* */ private int hWnd; /* */ /* */ public void drawScapePicImage(ScapePicImage image, int xDst, int yDst, int xSrc, int ySrc, int width, int height) /* */ { /* 48 */ if (this.hWnd == 0) { /* 49 */ Point loc = locationInWindow(); /* 50 */ Dimension size = getSize(); /* 51 */ String title = getFrameTitle(); /* 52 */ assert (title != null); /* 53 */ int hWndParent = Window.findWindow(title); /* 54 */ assert (hWndParent != 0); /* 55 */ this.hWnd = Window.findChildWindow(hWndParent, loc.x, loc.y, size.width, /* 56 */ size.height); /* 57 */ assert (this.hWnd != 0); /* */ } /* 59 */ bitBlt(this.hWnd, image.getDIB(), xDst, yDst, xSrc, ySrc, width, height); /* */ } /* */ /* */ private String getFrameTitle() /* */ { /* 64 */ for (Container c = getParent(); c != null; c = c.getParent()) /* 65 */ if ((c instanceof Frame)) /* 66 */ return ((Frame)c).getTitle(); /* 67 */ return null; /* */ } /* */ /* */ private Point locationInWindow() /* */ { /* 72 */ Point offset = getLocation(); /* 73 */ for (Container c = getParent(); c != null; c = c.getParent()) { /* 74 */ Point move = c.getLocation(); /* 75 */ offset.translate(move.x, move.y); /* */ } /* 77 */ return offset; /* */ } /* */ /* */ public static native void bitBlt(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8); /* */ } /* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\ScapePicCanvas.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */