1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
/* */ 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
*/
|