1 /********************************************************************************
2 *                                                                               *
3 *                           Device Context Tester                               *
4 *                                                                               *
5 *********************************************************************************
6 * Copyright (C) 1999,2006 by Jeroen van der Zijp.   All Rights Reserved.        *
7 *********************************************************************************
8 * $Id: dctest.cpp,v 1.50 2006/01/22 17:58:59 fox Exp $                          *
9 ********************************************************************************/
10 #include "fx.h"
11 #include <string.h>
12 #include "dippy.h"
13 
14 
15 /* Generated by reswrap from file double_dash.gif */
16 const unsigned char double_dash[]={
17   0x47,0x49,0x46,0x38,0x37,0x61,0x20,0x00,0x04,0x00,0xf0,0x00,0x00,0x00,0x00,0xff,
18   0x00,0xff,0xff,0x2c,0x00,0x00,0x00,0x00,0x20,0x00,0x04,0x00,0x00,0x02,0x17,0x84,
19   0x83,0x06,0x18,0xca,0x9e,0x4e,0x84,0x4d,0xd6,0x35,0x9f,0x55,0xbb,0xe3,0xab,0x7d,
20   0x9c,0xe8,0x85,0x66,0x54,0x00,0x00,0x3b
21   };
22 
23 /* Generated by reswrap from file onoff_dash.gif */
24 const unsigned char onoff_dash[]={
25   0x47,0x49,0x46,0x38,0x37,0x61,0x20,0x00,0x04,0x00,0xf0,0x00,0x00,0x00,0x00,0xff,
26   0xb2,0xc0,0xdc,0x2c,0x00,0x00,0x00,0x00,0x20,0x00,0x04,0x00,0x00,0x02,0x17,0x84,
27   0x83,0x06,0x18,0xca,0x9e,0x4e,0x84,0x4d,0xd6,0x35,0x9f,0x55,0xbb,0xe3,0xab,0x7d,
28   0x9c,0xe8,0x85,0x66,0x54,0x00,0x00,0x3b
29   };
30 
31 /* Generated by reswrap from file solid_line.gif */
32 const unsigned char solid_line[]={
33   0x47,0x49,0x46,0x38,0x37,0x61,0x20,0x00,0x04,0x00,0xf0,0x00,0x00,0x00,0x00,0xff,
34   0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x00,0x20,0x00,0x04,0x00,0x00,0x02,0x0a,0x84,
35   0x8f,0xa9,0xcb,0xed,0x0f,0xa3,0x9c,0xac,0x00,0x00,0x3b
36   };
37 
38 /* Generated by reswrap from file capbutt.gif */
39 const unsigned char capbutt[]={
40   0x47,0x49,0x46,0x38,0x37,0x61,0x20,0x00,0x0c,0x00,0xf1,0x00,0x00,0xb2,0xc0,0xdc,
41   0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x00,0x20,0x00,
42   0x0c,0x00,0x00,0x02,0x27,0x84,0x8f,0xa9,0x17,0xb1,0x0f,0x55,0x8b,0x14,0xce,0x27,
43   0xb2,0xde,0xbc,0xdf,0xd5,0x85,0xe2,0xa7,0x88,0xe6,0x46,0x26,0xe7,0x9a,0x22,0xeb,
44   0xd9,0x1e,0xaf,0x19,0x57,0x54,0x6d,0x5b,0x4e,0xce,0xb7,0x05,0x00,0x3b
45   };
46 
47 /* Generated by reswrap from file capnotlast.gif */
48 const unsigned char capnotlast[]={
49   0x47,0x49,0x46,0x38,0x37,0x61,0x20,0x00,0x0c,0x00,0xf1,0x00,0x00,0xb2,0xc0,0xdc,
50   0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x00,0x20,0x00,
51   0x0c,0x00,0x00,0x02,0x2b,0x84,0x8f,0xa9,0x17,0xb1,0x0f,0x55,0x8b,0x14,0xce,0x27,
52   0xb2,0xde,0x7c,0x9b,0xbb,0x74,0x62,0xf7,0x39,0xd8,0x88,0x0a,0x25,0x94,0xa2,0xeb,
53   0xd9,0x92,0x00,0xa8,0xc4,0xe2,0x5b,0xe5,0x8c,0xa9,0xeb,0x74,0x4f,0xf9,0x01,0x0a,
54   0x00,0x3b
55   };
56 
57 /* Generated by reswrap from file capproj.gif */
58 const unsigned char capproj[]={
59   0x47,0x49,0x46,0x38,0x37,0x61,0x20,0x00,0x0c,0x00,0xf1,0x00,0x00,0xb2,0xc0,0xdc,
60   0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x00,0x20,0x00,
61   0x0c,0x00,0x00,0x02,0x2c,0x84,0x8f,0xa9,0x17,0xb1,0x0f,0x55,0x8b,0x14,0xce,0x27,
62   0xb2,0xde,0xbc,0x37,0xad,0x74,0xe2,0xf8,0x65,0xe1,0x88,0x6a,0xa5,0x70,0xa6,0xe8,
63   0xda,0xba,0x22,0x9c,0xc8,0x6f,0x00,0x56,0x3a,0x70,0xed,0x7b,0xef,0xab,0x00,0x0d,
64   0x05,0x00,0x3b
65   };
66 
67 /* Generated by reswrap from file capround.gif */
68 const unsigned char capround[]={
69   0x47,0x49,0x46,0x38,0x37,0x61,0x20,0x00,0x0c,0x00,0xf1,0x00,0x00,0xb2,0xc0,0xdc,
70   0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x00,0x20,0x00,
71   0x0c,0x00,0x00,0x02,0x2c,0x84,0x8f,0xa9,0x17,0xb1,0x0f,0x55,0x8b,0x14,0xce,0x27,
72   0xb2,0xde,0xbc,0x37,0x81,0x75,0xa2,0xf8,0x81,0xca,0x88,0x6e,0xa5,0x89,0xa4,0xee,
73   0x7a,0xba,0x68,0xb9,0xc8,0x73,0xc0,0x56,0x3a,0x70,0xed,0x7b,0xef,0xab,0x00,0x0d,
74   0x05,0x00,0x3b
75   };
76 
77 /* Generated by reswrap from file jbevel.gif */
78 const unsigned char jbevel[]={
79   0x47,0x49,0x46,0x38,0x37,0x61,0x20,0x00,0x10,0x00,0xf0,0x00,0x00,0xb2,0xc0,0xdc,
80   0x00,0x00,0xff,0x2c,0x00,0x00,0x00,0x00,0x20,0x00,0x10,0x00,0x00,0x02,0x30,0x84,
81   0x8f,0xa9,0xcb,0xed,0xff,0x82,0x94,0xb0,0x82,0x89,0xad,0xc3,0x5c,0x2f,0x0e,0x7a,
82   0x08,0x48,0x8a,0x57,0x67,0x84,0x9a,0x7a,0xb0,0x11,0x9a,0xb8,0x8c,0x3c,0xc2,0x9f,
83   0x7d,0x67,0xf9,0x54,0xd1,0x74,0xf3,0xe3,0x79,0x84,0x33,0xd3,0x45,0x51,0x00,0x00,
84   0x3b
85   };
86 
87 /* Generated by reswrap from file jmiter.gif */
88 const unsigned char jmiter[]={
89   0x47,0x49,0x46,0x38,0x37,0x61,0x20,0x00,0x10,0x00,0xf0,0x00,0x00,0xb2,0xc0,0xdc,
90   0x00,0x00,0xff,0x2c,0x00,0x00,0x00,0x00,0x20,0x00,0x10,0x00,0x00,0x02,0x33,0x84,
91   0x8f,0x19,0xc9,0xed,0x18,0xe2,0x9b,0x2f,0x5a,0x8a,0x8f,0xdd,0x99,0xee,0xdf,0x39,
92   0xdf,0x18,0x2a,0x23,0x59,0x02,0xa8,0x0a,0x86,0xab,0xf1,0x4e,0x31,0xdc,0xca,0x35,
93   0x33,0x43,0x77,0x93,0xb3,0x1c,0x36,0xeb,0xf1,0x76,0xb4,0x45,0xe9,0x52,0x49,0xc1,
94   0x18,0x05,0x00,0x3b
95   };
96 
97 /* Generated by reswrap from file jround.gif */
98 const unsigned char jround[]={
99   0x47,0x49,0x46,0x38,0x37,0x61,0x20,0x00,0x10,0x00,0xf0,0x00,0x00,0xb2,0xc0,0xdc,
100   0x00,0x00,0xff,0x2c,0x00,0x00,0x00,0x00,0x20,0x00,0x10,0x00,0x00,0x02,0x32,0x84,
101   0x8f,0xa9,0xcb,0xed,0x0f,0x83,0x84,0xd4,0xc8,0x3b,0x6b,0xc3,0x5c,0x2f,0x0e,0x7a,
102   0x08,0x48,0x8a,0x40,0x68,0x75,0x1a,0x7a,0xb0,0x8f,0xdb,0xaa,0x0e,0x3c,0xca,0x9f,
103   0x7d,0x63,0x0c,0x9d,0x5f,0x0a,0xbf,0xc3,0xa5,0x02,0x22,0xdf,0xc6,0x74,0x52,0x14,
104   0x00,0x00,0x3b
105   };
106 
107 
108 /* Generated by reswrap from file minifolder.gif */
109 const unsigned char minifolder[]={
110   0x47,0x49,0x46,0x38,0x37,0x61,0x10,0x00,0x10,0x00,0xf2,0x00,0x00,0xb2,0xc0,0xdc,
111   0x80,0x80,0x80,0xc0,0xc0,0xc0,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0x00,
112   0x00,0x00,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x03,
113   0x3b,0x08,0xba,0xdc,0x1b,0x10,0x3a,0x16,0xc4,0xb0,0x22,0x4c,0x50,0xaf,0xcf,0x91,
114   0xc4,0x15,0x64,0x69,0x92,0x01,0x31,0x7e,0xac,0x95,0x8e,0x58,0x7b,0xbd,0x41,0x21,
115   0xc7,0x74,0x11,0xef,0xb3,0x5a,0xdf,0x9e,0x1c,0x6f,0x97,0x03,0xba,0x7c,0xa1,0x64,
116   0x48,0x05,0x20,0x38,0x9f,0x50,0xe8,0x66,0x4a,0x75,0x24,0x00,0x00,0x3b
117   };
118 
119 
120 // Simple bitmap pattern
121 #define bitmap_width 64
122 #define bitmap_height 64
123 static unsigned char bitmap_bits[] = {
124    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00,
125    0x00, 0x00, 0x00, 0xc0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0,
126    0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x11, 0x00, 0x00, 0x00,
127    0x00, 0x00, 0x00, 0x88, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84,
128    0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x81, 0x00, 0x00, 0x00,
129    0x00, 0x00, 0x00, 0x81, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80,
130    0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x01, 0x04, 0x00, 0x00,
131    0x00, 0x00, 0x20, 0x80, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x80,
132    0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x80, 0x01, 0x20, 0x00, 0x00,
133    0x00, 0x00, 0x04, 0x80, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80,
134    0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0x01, 0x00,
135    0x00, 0x80, 0x00, 0x80, 0x01, 0x00, 0x02, 0x00, 0x00, 0x40, 0x00, 0x80,
136    0x01, 0x00, 0x04, 0x00, 0x00, 0x20, 0x00, 0x80, 0x01, 0x00, 0x08, 0x00,
137    0x00, 0x10, 0x00, 0x80, 0x01, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x80,
138    0x01, 0x00, 0x20, 0x00, 0x00, 0x04, 0x00, 0x80, 0x01, 0x00, 0x40, 0x00,
139    0x00, 0x02, 0x00, 0x80, 0x01, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x80,
140    0x01, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x02,
141    0x40, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00, 0x80,
142    0x01, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10,
143    0x08, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x80,
144    0x01, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80,
145    0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80,
146    0x01, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x20,
147    0x04, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x80,
148    0x01, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x04,
149    0x20, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x80,
150    0x01, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x80, 0x01, 0x00, 0x80, 0x00,
151    0x00, 0x01, 0x00, 0x80, 0x01, 0x00, 0x40, 0x00, 0x00, 0x02, 0x00, 0x80,
152    0x01, 0x00, 0x20, 0x00, 0x00, 0x04, 0x00, 0x80, 0x01, 0x00, 0x10, 0x00,
153    0x00, 0x08, 0x00, 0x80, 0x01, 0x00, 0x08, 0x00, 0x00, 0x10, 0x00, 0x80,
154    0x01, 0x00, 0x04, 0x00, 0x00, 0x20, 0x00, 0x80, 0x01, 0x00, 0x02, 0x00,
155    0x00, 0x40, 0x00, 0x80, 0x01, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, 0x80,
156    0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0xff, 0xff, 0x00, 0x00,
157    0x00, 0x00, 0x02, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x04, 0x80,
158    0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x08, 0x80, 0xff, 0xff, 0x00, 0x00,
159    0x00, 0x00, 0x10, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x20, 0x80,
160    0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0xff, 0xff, 0x00, 0x00,
161    0x00, 0x00, 0x80, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81,
162    0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0xff, 0xff, 0x00, 0x00,
163    0x00, 0x00, 0x00, 0x84, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88,
164    0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0xff, 0xff, 0x00, 0x00,
165    0x00, 0x00, 0x00, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
166    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
167    };
168 
169 
170 /* Generated by reswrap from file slate.gif */
171 const unsigned char slate[]={
172   0x47,0x49,0x46,0x38,0x39,0x61,0x30,0x00,0x30,0x00,0xf7,0x00,0x00,0x86,0x86,0x86,
173   0x87,0x87,0x87,0x89,0x89,0x89,0x8b,0x8b,0x8b,0x8c,0x8c,0x8c,0x8d,0x8d,0x8d,0x8e,
174   0x8e,0x8e,0x8f,0x8f,0x8f,0x90,0x90,0x90,0x91,0x91,0x91,0x92,0x92,0x92,0x93,0x93,
175   0x93,0x94,0x94,0x94,0x95,0x95,0x95,0x96,0x96,0x96,0x97,0x97,0x97,0x98,0x98,0x98,
176   0x99,0x99,0x99,0x9a,0x9a,0x9a,0x9b,0x9b,0x9b,0x9c,0x9c,0x9c,0x9d,0x9d,0x9d,0x9e,
177   0x9e,0x9e,0x9f,0x9f,0x9f,0xa0,0xa0,0xa0,0xa1,0xa1,0xa1,0xa2,0xa2,0xa2,0xa3,0xa3,
178   0xa3,0xa4,0xa4,0xa4,0xa5,0xa5,0xa5,0xa6,0xa6,0xa6,0xa7,0xa7,0xa7,0xa8,0xa8,0xa8,
179   0xa9,0xa9,0xa9,0xaa,0xaa,0xaa,0xab,0xab,0xab,0xac,0xac,0xac,0xad,0xad,0xad,0xae,
180   0xae,0xae,0xaf,0xaf,0xaf,0xb0,0xb0,0xb0,0xb1,0xb1,0xb1,0xb2,0xb2,0xb2,0xb3,0xb3,
181   0xb3,0xb4,0xb4,0xb4,0xb5,0xb5,0xb5,0xb6,0xb6,0xb6,0xb7,0xb7,0xb7,0xb8,0xb8,0xb8,
182   0xb9,0xb9,0xb9,0xba,0xba,0xba,0xbb,0xbb,0xbb,0xbc,0xbc,0xbc,0xbd,0xbd,0xbd,0xbe,
183   0xbe,0xbe,0xbf,0xbf,0xbf,0xc0,0xc0,0xc0,0xc1,0xc1,0xc1,0xc2,0xc2,0xc2,0xc3,0xc3,
184   0xc3,0xc4,0xc4,0xc4,0xc5,0xc5,0xc5,0xc6,0xc6,0xc6,0xc7,0xc7,0xc7,0xc8,0xc8,0xc8,
185   0xc9,0xc9,0xc9,0xca,0xca,0xca,0xcb,0xcb,0xcb,0xcc,0xcc,0xcc,0xcd,0xcd,0xcd,0xce,
186   0xce,0xce,0xcf,0xcf,0xcf,0xd0,0xd0,0xd0,0xd1,0xd1,0xd1,0xd2,0xd2,0xd2,0xd3,0xd3,
187   0xd3,0xd4,0xd4,0xd4,0xd5,0xd5,0xd5,0xd6,0xd6,0xd6,0xd7,0xd7,0xd7,0xd8,0xd8,0xd8,
188   0xd9,0xd9,0xd9,0xda,0xda,0xda,0xdb,0xdb,0xdb,0xdc,0xdc,0xdc,0xdd,0xdd,0xdd,0xde,
189   0xde,0xde,0xdf,0xdf,0xdf,0xe0,0xe0,0xe0,0xe1,0xe1,0xe1,0xe2,0xe2,0xe2,0xe3,0xe3,
190   0xe3,0xe4,0xe4,0xe4,0xe6,0xe6,0xe6,0xe7,0xe7,0xe7,0xe8,0xe8,0xe8,0x37,0xa9,0x04,
191   0x02,0x8a,0x00,0x20,0x14,0x00,0x04,0x40,0x00,0x00,0xa4,0x90,0x00,0xfe,0x49,0x00,
192   0x10,0x1c,0x00,0x40,0x08,0x37,0xa4,0x08,0x01,0xfe,0xef,0x00,0x10,0xff,0x00,0x40,
193   0xbf,0xc9,0x90,0xce,0xeb,0x46,0x84,0x05,0x08,0x04,0x08,0x40,0x40,0x90,0x03,0x90,
194   0x49,0x00,0x49,0x1c,0x00,0x1c,0x08,0x00,0x08,0x37,0x08,0x60,0x02,0x50,0x9a,0x20,
195   0x1c,0x1c,0x04,0x08,0x08,0x00,0x01,0xb8,0xf1,0x80,0x50,0xff,0x04,0x1c,0xbf,0x40,
196   0x08,0x09,0xa4,0xa4,0x00,0xfe,0xfe,0x00,0x10,0x10,0x00,0x40,0x40,0x25,0x04,0x90,
197   0x00,0x00,0x49,0x00,0x00,0x1c,0x00,0x00,0x08,0x01,0x90,0x00,0x00,0x49,0x00,0x00,
198   0x1c,0x00,0x00,0x08,0x00,0x88,0x28,0x28,0xf1,0xf0,0xef,0xff,0xff,0xff,0x10,0xce,
199   0x4e,0x00,0x84,0x1d,0x20,0x04,0x06,0x04,0x40,0x40,0x90,0x90,0x32,0x49,0x49,0x51,
200   0x1c,0x1c,0x1c,0x08,0x08,0x08,0xc0,0x60,0xc0,0xf4,0x9a,0xef,0xff,0x1c,0xff,0xbf,
201   0x08,0xbf,0x37,0x01,0x0a,0x01,0x80,0x00,0x00,0x04,0x00,0x00,0x40,0x00,0x2e,0xa4,
202   0xa4,0xfb,0xfe,0xfe,0x08,0x10,0x10,0xcd,0x04,0x04,0x97,0x00,0x00,0x0e,0x00,0x00,
203   0x08,0x00,0x00,0x00,0x90,0x0c,0x18,0x48,0x0c,0x00,0xf0,0x00,0x00,0xff,0x00,0x00,
204   0xbf,0x00,0xd5,0x34,0xc0,0x81,0x24,0xef,0x04,0x1a,0xff,0x40,0x40,0xbf,0x74,0x90,
205   0xc0,0x50,0x49,0xef,0x1c,0x1c,0xff,0x08,0x08,0xbf,0x00,0x60,0x03,0x00,0x9a,0x00,
206   0x00,0xc4,0x40,0x00,0x50,0x2d,0x00,0x1c,0x18,0x00,0x08,0x08,0xe6,0xa4,0xf9,0xea,
207   0xfe,0xd7,0x05,0x10,0x05,0x08,0x40,0x08,0x00,0x50,0x90,0x00,0x2f,0x49,0x00,0x26,
208   0x1c,0x3c,0x7f,0x71,0x02,0xa7,0x00,0x20,0x17,0x20,0x04,0x0c,0x04,0x00,0xa4,0x60,
209   0x00,0xfe,0x9a,0x00,0x90,0xd5,0x00,0x46,0x81,0x00,0x08,0x04,0x98,0x03,0x58,0x8c,
210   0x00,0x52,0x1d,0x00,0x1c,0x7e,0x08,0x70,0x00,0x50,0xef,0x00,0x1c,0xff,0x00,0x08,
211   0xbf,0x37,0x4c,0x04,0x01,0x02,0x00,0x00,0x00,0x00,0x0c,0x00,0x01,0x0a,0x00,0x00,
212   0x98,0x04,0xc0,0x8c,0x00,0xef,0x1d,0x00,0xff,0x08,0x00,0xbf,0x30,0xa4,0x03,0x00,
213   0xfe,0x00,0x00,0x10,0x00,0x30,0x88,0x0b,0x30,0xcf,0xd5,0x00,0x52,0x81,0x00,0x50,
214   0xd0,0x00,0x4f,0x50,0x00,0x1c,0x1c,0xec,0x08,0x90,0xf1,0x50,0xef,0xf0,0x4c,0x04,
215   0xf1,0x02,0x00,0xff,0x00,0x00,0xbf,0x00,0x00,0xf4,0x3c,0x50,0xf1,0x7a,0x46,0xff,
216   0x19,0x08,0xbf,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
217   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
218   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
219   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
220   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0xfe,0x15,
221   0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x54,0x68,0x65,
222   0x20,0x47,0x49,0x4d,0x50,0x00,0x2c,0x00,0x00,0x00,0x00,0x30,0x00,0x30,0x00,0x00,
223   0x08,0xfe,0x00,0x4b,0xcc,0xe0,0xb1,0x23,0x47,0x8f,0x1f,0x3c,0x60,0xbc,0x68,0xb1,
224   0x62,0x45,0x8b,0x17,0x31,0x16,0xa6,0x08,0xc1,0x81,0x83,0x08,0x14,0x23,0x52,0xb8,
225   0x68,0xc1,0x82,0xc5,0x09,0x10,0x34,0x70,0xdc,0x88,0x21,0xa3,0xc7,0x90,0x21,0x45,
226   0x92,0x28,0x31,0x02,0xe4,0x86,0x89,0x0b,0x23,0x60,0x88,0xac,0x81,0x23,0xc7,0x8d,
227   0x85,0x2b,0x54,0xac,0x70,0x11,0x63,0x06,0xc7,0x14,0x23,0x3e,0x7c,0x20,0x81,0xc2,
228   0xc5,0x0c,0x1b,0x33,0x64,0xc8,0x70,0x71,0xa2,0x85,0x0d,0x1d,0x34,0x64,0xe4,0x10,
229   0x52,0x24,0x88,0x90,0x20,0x3f,0x80,0xf4,0x80,0x21,0xe2,0x44,0x0c,0x91,0x34,0x6a,
230   0xd4,0xa0,0x81,0x53,0xa7,0x0b,0x19,0x35,0x54,0xa4,0x38,0x31,0x42,0xc4,0x88,0x13,
231   0x2b,0x8e,0xda,0x88,0x01,0x23,0xa2,0x0a,0x15,0x36,0x7a,0xe0,0x40,0xcb,0x43,0xc8,
232   0x0f,0x1f,0x3a,0x6e,0xe8,0xe0,0x61,0xa3,0x45,0x0c,0x1b,0x3b,0x76,0x88,0xb4,0x51,
233   0x43,0x06,0x0c,0x86,0x2c,0xce,0xd2,0x28,0x31,0x22,0x04,0x88,0x10,0x26,0x58,0xd4,
234   0x8d,0xca,0x11,0xc6,0xe3,0x16,0x35,0x76,0xe8,0x60,0x2c,0x38,0xeb,0x8e,0xa5,0x24,
235   0x61,0xdc,0xc8,0xc1,0xa3,0xc7,0x8e,0x1b,0x36,0x6c,0xdc,0x68,0xfc,0xc2,0x85,0x8b,
236   0x17,0x30,0x40,0x78,0xe0,0xd0,0x21,0x04,0x8a,0x17,0x34,0x60,0x38,0x66,0xd1,0xe2,
237   0x28,0x8d,0xdb,0x33,0x0c,0xf2,0xd0,0x91,0x63,0x07,0x10,0x1e,0x2f,0x4a,0x98,0x30,
238   0x6a,0x13,0x87,0xe8,0x1a,0x33,0x6a,0xe4,0x98,0x39,0x23,0xa2,0x0b,0x0f,0x1d,0x7a,
239   0xfe,0x9b,0xd8,0xf9,0xc2,0x21,0x0b,0x14,0x2a,0x62,0x60,0x57,0x01,0x17,0x87,0x90,
240   0x21,0x41,0x80,0xd8,0x58,0xde,0x62,0x44,0x09,0x17,0x35,0x74,0x88,0xd5,0x01,0x15,
241   0x6d,0x4d,0xfe,0x38,0xd4,0x10,0x91,0x07,0x20,0x94,0xa0,0xd9,0x0b,0x2a,0x90,0xa0,
242   0x02,0x0b,0x2b,0xa0,0x90,0xc2,0x0b,0x8e,0xa9,0x50,0x94,0x0e,0x41,0x54,0x58,0x84,
243   0x0e,0x3b,0x14,0x86,0xc2,0x0a,0xb8,0x11,0x36,0x1f,0x0f,0xd8,0xcd,0x66,0x5d,0x0f,
244   0x3c,0xe0,0x10,0xdc,0x50,0xa0,0xed,0x55,0xc2,0x06,0x31,0xd0,0x30,0x03,0x6e,0x35,
245   0xd8,0x70,0x1c,0x7e,0x3e,0xfc,0xa0,0x43,0x0f,0x45,0x0c,0xe1,0x43,0x0d,0x2d,0x18,
246   0xe6,0x02,0x0a,0x3a,0xf8,0x54,0x1c,0x63,0x31,0x7c,0x05,0xc4,0x10,0x40,0x8c,0x46,
247   0x43,0x10,0xd6,0xf1,0xf0,0xe2,0x0a,0x1d,0x9c,0x30,0xc3,0x0c,0x27,0xa4,0x50,0x13,
248   0x0b,0x2a,0xd0,0xf0,0x03,0x7c,0x3e,0xf8,0x70,0xe4,0x10,0x3c,0x2c,0x25,0x9c,0x4c,
249   0x73,0x61,0xe9,0x02,0x0d,0x39,0xc0,0x50,0x03,0x0f,0x3f,0xfc,0x55,0xe3,0x0c,0x2a,
250   0xc8,0xd4,0x18,0x0a,0x14,0x5c,0x50,0xc2,0x0a,0x26,0x94,0x90,0x02,0x0a,0x20,0xa8,
251   0x30,0xc3,0x0f,0x44,0x20,0x99,0x55,0x0f,0x3d,0x04,0x59,0x97,0x0b,0x29,0xd4,0x70,
252   0x03,0x0d,0x2a,0x84,0x30,0x42,0x0c,0x3e,0xd0,0x70,0xc3,0x0e,0x3d,0xd4,0x28,0x04,
253   0x11,0x37,0x2c,0x68,0x43,0x4d,0x31,0x70,0xd0,0xc0,0x05,0x0a,0xa2,0x20,0x42,0x07,
254   0x1b,0xa0,0x50,0x12,0x11,0x44,0x60,0x95,0x64,0x41,0x62,0xd5,0xe0,0x42,0x09,0xfe,
255   0x3d,0xc5,0x80,0x82,0x07,0x1f,0xac,0x20,0x18,0x0f,0x35,0xfa,0x40,0x68,0x5f,0x32,
256   0x40,0x04,0xc3,0xa6,0x2c,0x44,0x10,0x01,0x07,0xc5,0xad,0x20,0xdd,0x09,0x2f,0x50,
257   0x28,0x04,0x10,0x5d,0x12,0x3a,0x5a,0x4d,0x32,0x14,0xe5,0x82,0x47,0x22,0x88,0x50,
258   0x82,0x0a,0x38,0xdc,0xd8,0x66,0x89,0x34,0xf0,0x50,0xe4,0x0b,0x27,0xa4,0xc7,0x82,
259   0x06,0x0d,0x3c,0x50,0x02,0x6c,0x74,0x15,0x75,0xc3,0x41,0x3e,0x10,0x14,0x5f,0x90,
260   0x47,0xcd,0x10,0x19,0x0b,0x7b,0x9e,0x40,0x59,0x08,0x10,0xa1,0xc9,0x03,0x0f,0x37,
261   0x24,0xe5,0xc2,0xa6,0x1b,0xc1,0xd0,0xa8,0x03,0x05,0x5c,0xe0,0xc2,0xa2,0x31,0xb4,
262   0xa0,0xe6,0x8d,0x24,0xee,0x10,0x5f,0x0e,0xe5,0xdd,0xf6,0xd0,0x46,0x2b,0xa4,0x60,
263   0x42,0x5b,0x29,0xa4,0xb0,0xc2,0xaf,0xdc,0x1d,0xdc,0x43,0x73,0x3e,0xd8,0xb0,0x42,
264   0x06,0x0b,0x48,0x20,0xd0,0x0c,0x67,0xc6,0xc8,0x5a,0xa5,0x3d,0x00,0x21,0x84,0x0f,
265   0x32,0x64,0xdc,0x02,0x4f,0x32,0x24,0x8c,0x42,0x09,0x25,0x84,0x8b,0x42,0x95,0xc0,
266   0x8d,0x75,0x03,0x0b,0x2f,0x6c,0x3a,0xc4,0x12,0x43,0xd0,0x70,0x02,0x06,0x16,0x8c,
267   0x20,0xc3,0x71,0x39,0x6c,0xc7,0x5a,0x8d,0x3f,0x04,0x61,0x04,0xa6,0x58,0x2a,0xfc,
268   0xc2,0x0c,0x64,0x99,0x00,0xc2,0x5b,0x28,0xa0,0x70,0xe0,0x9e,0x2c,0xa8,0x07,0x16,
269   0x9a,0x07,0x8d,0x70,0x81,0x05,0x18,0xd4,0xa0,0x84,0x0f,0x45,0x00,0x91,0x98,0x0f,
270   0x97,0x12,0x11,0xf5,0x0f,0x36,0x34,0x0a,0x82,0xb5,0x71,0x89,0x04,0x43,0xfe,0x0a,
271   0x7a,0x96,0x40,0x82,0xdf,0x0a,0xa2,0xd5,0x5c,0x60,0x4f,0x75,0xf9,0x82,0x08,0x16,
272   0x50,0x90,0xc2,0x0f,0x57,0x09,0x71,0x15,0x10,0x41,0x10,0x31,0xb5,0xdc,0x46,0x0b,
273   0x65,0x19,0x09,0x2c,0x84,0xc4,0xa8,0xb5,0xd5,0x4a,0xf7,0x9b,0x89,0xd6,0xe5,0xc0,
274   0x58,0x93,0x3f,0xb8,0x60,0x01,0x04,0x1a,0xbc,0x70,0x84,0x49,0x49,0x24,0x91,0xa3,
275   0xe4,0x48,0x1c,0x01,0x04,0x0d,0x7c,0x12,0x38,0xc2,0x08,0x7f,0x9b,0x90,0x27,0x09,
276   0x21,0x5c,0x84,0xdb,0x43,0x34,0x6c,0x4c,0x43,0x54,0x2d,0xe2,0xc0,0x83,0x12,0x34,
277   0x50,0xf0,0xc0,0x04,0x25,0x1c,0xe1,0xc3,0x10,0x4a,0x34,0xd1,0xc4,0x4a,0x44,0x20,
278   0x61,0x84,0x10,0x39,0xbc,0x2a,0x82,0xa3,0x38,0x53,0xd4,0x01,0x09,0x2b,0x90,0xf0,
279   0x96,0x84,0x22,0x80,0x40,0x02,0x09,0x0f,0xd6,0x2c,0x43,0xe1,0x4a,0xcc,0x50,0x81,
280   0x04,0x14,0x88,0xe0,0x32,0x55,0x4c,0x4c,0x31,0x05,0xd1,0x43,0x10,0xf1,0x72,0x61,
281   0xf6,0x7a,0x70,0x6d,0x0a,0xe5,0x53,0xd0,0x09,0x28,0x82,0x01,0x09,0x94,0x2b,0x69,
282   0xe9,0x89,0xd1,0x0d,0x78,0x00,0x39,0x22,0xcc,0x60,0x03,0x75,0x1a,0x01,0x0d,0xaa,
283   0x12,0x84,0x24,0x50,0xe1,0x0a,0x4f,0x30,0x42,0x85,0xb4,0xb2,0x17,0x7a,0x6d,0xcd,
284   0x04,0x24,0x00,0x41,0x45,0x3a,0xc0,0x81,0x0b,0x4c,0xc0,0x80,0x0a,0x70,0x40,0x05,
285   0x4c,0x00,0x9a,0xa6,0xe9,0x00,0x6e,0x42,0xe8,0x81,0x4b,0x26,0x60,0xa7,0x13,0x20,
286   0x29,0x08,0x47,0x88,0x42,0x15,0xa6,0xe0,0x84,0x54,0x71,0x0b,0x06,0xfe,0xd3,0x3a,
287   0x81,0x08,0x36,0x60,0x81,0x09,0x44,0xe0,0x01,0x0d,0x48,0xe2,0x04,0x32,0xa0,0x01,
288   0x0b,0x5c,0x80,0x03,0x45,0xb1,0x41,0xd3,0x58,0xe3,0xb2,0xc1,0xb8,0x20,0x02,0x14,
289   0x28,0x01,0x08,0x80,0x70,0xa4,0x23,0x34,0x41,0x0a,0x55,0xb0,0x02,0x12,0xb0,0x17,
290   0x83,0x8d,0xcc,0x0c,0x04,0x26,0x40,0xc1,0x07,0x22,0xa0,0x00,0x08,0x60,0x00,0x03,
291   0x1d,0xb0,0x8f,0x08,0x84,0xf2,0x81,0x1f,0xa5,0x60,0x06,0x38,0x78,0x11,0x0c,0xfe,
292   0x62,0x83,0x12,0x4c,0xe0,0x01,0x18,0x18,0xc1,0x60,0xa4,0xb6,0x84,0x27,0x48,0x81,
293   0x0a,0x50,0x40,0xc2,0x0e,0xea,0xd3,0x95,0x16,0x84,0x27,0x03,0x10,0x38,0xc0,0x01,
294   0x50,0xc7,0x01,0x0d,0x5c,0xe0,0x02,0x19,0xe0,0x00,0xad,0xf6,0xd4,0x02,0xeb,0x90,
295   0xe5,0x4c,0x36,0x49,0x01,0x06,0x26,0x00,0x02,0x17,0x54,0x28,0x08,0x43,0x30,0xc2,
296   0x12,0xa0,0xc0,0x43,0x24,0xf0,0x80,0x05,0x1f,0xe0,0xc0,0x08,0x54,0xe0,0x01,0x0d,
297   0x54,0xe0,0x01,0x0c,0x70,0xe3,0x07,0x44,0x70,0x81,0x05,0x1c,0x60,0x01,0x13,0xc0,
298   0x80,0x06,0xae,0x45,0x83,0x2e,0xd9,0xe0,0x05,0x0b,0x59,0xe0,0x0c,0x4a,0x20,0x82,
299   0x17,0xfc,0x20,0x09,0x46,0x80,0xcf,0x10,0x90,0xf0,0x84,0x29,0x3c,0x61,0x09,0x40,
300   0xf8,0x8e,0x06,0x44,0xd0,0x02,0x0f,0x64,0xa0,0x02,0x75,0xd2,0x40,0x45,0x3c,0x50,
301   0x01,0x04,0x08,0x40,0x00,0x08,0x90,0x00,0x06,0x90,0xa5,0x03,0xad,0x2c,0x2a,0x2a,
302   0x39,0xf8,0x81,0x0c,0x6f,0x00,0x84,0xd6,0x1d,0xa1,0x08,0x44,0xfe,0x28,0x82,0x12,
303   0x0c,0xe9,0x84,0x26,0x14,0x81,0x06,0x23,0xf0,0x40,0xa2,0x3a,0x60,0x81,0x06,0x2c,
304   0x00,0x02,0x14,0x00,0xa7,0x03,0x1c,0xb0,0x00,0x03,0x0c,0x20,0x01,0x16,0x68,0x66,
305   0x5e,0xda,0x95,0x98,0xe5,0x50,0xea,0x48,0x45,0x38,0xc2,0x11,0xf2,0x67,0x84,0x24,
306   0x2c,0xa1,0x09,0x4f,0x48,0xe4,0x4a,0x70,0x60,0x31,0x18,0xf0,0x20,0x04,0x16,0x48,
307   0x00,0x01,0x0e,0xd0,0x80,0x08,0x48,0x40,0x00,0x09,0x80,0x80,0x04,0x22,0xb0,0x4e,
308   0xed,0x1c,0x84,0x50,0xa8,0x7c,0x19,0x73,0x70,0xe4,0xba,0xe7,0xfc,0x40,0x9f,0x4e,
309   0xe8,0x27,0x13,0xa8,0x32,0x04,0x1d,0x2c,0x84,0x06,0x3d,0xd0,0x00,0x05,0x1c,0xc0,
310   0x00,0x07,0x3c,0x80,0xa9,0x06,0x70,0x00,0x06,0x3c,0x30,0x02,0x16,0xb8,0x87,0x71,
311   0x2f,0x0b,0x02,0x12,0x92,0x40,0x04,0x1f,0x88,0xc6,0x24,0xd1,0xfc,0x81,0xf1,0x84,
312   0x70,0x04,0x25,0x28,0xc1,0x7a,0x71,0xf3,0x81,0x88,0x7a,0x90,0x00,0x06,0x44,0xe0,
313   0x02,0x05,0x3c,0x00,0x00,0x82,0xe9,0x01,0x13,0xbc,0x00,0x07,0x40,0xd0,0x60,0xa0,
314   0xa4,0xd6,0x04,0xa2,0x75,0xc9,0x4b,0xf9,0x43,0x95,0x75,0xb6,0x54,0x04,0x7c,0x0e,
315   0xe1,0x08,0xb1,0x93,0xdb,0xbe,0x7a,0xb0,0x80,0x05,0x34,0x40,0x9d,0xdf,0x84,0x40,
316   0x03,0x52,0xa0,0x98,0x1e,0x40,0xa1,0x0a,0x4b,0xf0,0xe8,0x12,0x94,0xc0,0x04,0x26,
317   0x10,0xe1,0x69,0x8c,0x4b,0x42,0x13,0x56,0x17,0x3c,0xac,0x1c,0x81,0x0a,0xcf,0x3b,
318   0x52,0x12,0x98,0x80,0x84,0xe7,0xf0,0x20,0x01,0x0d,0x58,0xfe,0xe2,0x07,0x32,0x03,
319   0xc4,0xa6,0x41,0x68,0x08,0x4e,0x60,0x82,0x13,0xa4,0xc0,0xc3,0xcd,0x6a,0xb0,0x4d,
320   0x84,0x22,0x6b,0x51,0xf5,0xb2,0x84,0x8c,0x46,0x41,0x08,0x4c,0x28,0x02,0x12,0x9a,
321   0x10,0x05,0x28,0x28,0x21,0x55,0x03,0x40,0x40,0x03,0x20,0x30,0x81,0x0d,0x9c,0x40,
322   0x38,0x2f,0x40,0x01,0xf8,0x76,0x50,0xd6,0x28,0x60,0x21,0x0b,0x51,0x48,0xc2,0x56,
323   0x91,0xd0,0xa5,0x82,0xf8,0x20,0x50,0x3d,0xb0,0xde,0x14,0x98,0x90,0x04,0x27,0x58,
324   0x30,0xa8,0x3a,0xc4,0x42,0x15,0x3c,0x5b,0x00,0xd8,0x46,0xc0,0x02,0x51,0x7a,0xd5,
325   0x07,0xea,0x5a,0x4c,0x20,0xfc,0x00,0x0a,0x54,0xa0,0x02,0x13,0x10,0x7b,0x56,0x4a,
326   0x05,0x17,0x09,0x48,0x18,0x42,0x67,0xa5,0xf0,0x84,0x26,0x40,0xe1,0x09,0x54,0xa8,
327   0x02,0x15,0xa6,0x50,0x05,0x2d,0x68,0xe1,0x09,0x42,0x08,0x80,0x00,0x0c,0xf0,0x00,
328   0x0d,0x8c,0x40,0x77,0x41,0x01,0x01,0x0b,0xda,0xb9,0x03,0x1a,0x6c,0xf5,0x08,0x92,
329   0x4b,0x82,0xec,0x9c,0x93,0x4f,0xd1,0x16,0xd7,0xa3,0x48,0x70,0xc2,0x14,0x78,0xdb,
330   0x04,0x2c,0x5c,0x41,0x0a,0x51,0xb0,0x42,0x16,0x9c,0xe0,0x83,0x99,0x4e,0x40,0x03,
331   0xbd,0xeb,0x00,0x26,0x2f,0x50,0x01,0x62,0x55,0x6a,0x3e,0x35,0x02,0x02,0x11,0x8e,
332   0x10,0x04,0xc1,0x48,0xed,0x08,0xab,0x4d,0x42,0x2a,0x95,0x10,0x84,0xfa,0x3d,0xa1,
333   0x0a,0x4a,0xb0,0x71,0x14,0x0a,0x69,0x05,0x27,0x00,0x21,0x29,0x40,0x04,0xa0,0x52,
334   0xa7,0xcb,0x00,0x05,0x6c,0x20,0x2f,0x2e,0xa2,0x50,0xfe,0xfe,0x84,0xa0,0x83,0x88,
335   0x20,0x59,0x08,0x48,0x50,0x82,0x46,0xa1,0x50,0xe5,0x27,0x20,0x01,0x0b,0x4f,0xb0,
336   0xc2,0x15,0xa2,0x80,0x84,0x25,0x58,0x61,0x0a,0x48,0x70,0x14,0x09,0x3c,0x30,0x01,
337   0x05,0x1c,0xc0,0x00,0x45,0xb6,0xc0,0x02,0x2c,0x00,0x83,0xc9,0xb4,0x80,0xbb,0x09,
338   0xee,0xc1,0x31,0x43,0xf0,0xa0,0x19,0xec,0xc0,0x08,0x4e,0x78,0x82,0x12,0xac,0x50,
339   0x84,0xbe,0x0a,0x41,0x0b,0x12,0xde,0x73,0x59,0xaf,0x90,0x85,0x27,0x38,0x96,0x01,
340   0x08,0x18,0x80,0x00,0x08,0x80,0x00,0x0c,0x10,0xf9,0x02,0x26,0x10,0x4c,0xaf,0x72,
341   0x80,0x92,0x1f,0x2c,0x2a,0x2d,0x97,0x89,0xc1,0x41,0x8a,0x00,0x05,0x06,0xb3,0x57,
342   0xb4,0x54,0xc8,0x82,0x8e,0xb5,0xb0,0x85,0x2e,0x7c,0xa1,0xd4,0x0b,0x30,0x74,0x01,
343   0x56,0x9a,0x4b,0x05,0x24,0x2d,0x59,0x5b,0x19,0x0a,0x0b,0xe6,0x43,0xa2,0x4a,0xc5,
344   0x20,0x04,0x1b,0x20,0x01,0x70,0x7e,0xc0,0x84,0x06,0x67,0x16,0x09,0x4c,0x90,0xc2,
345   0x15,0xf4,0xbc,0xc3,0x2b,0x6c,0x01,0x0b,0x50,0x78,0x40,0x43,0x0b,0x80,0x00,0x07,
346   0x4c,0xc0,0x02,0x1a,0x91,0x41,0x76,0x78,0x14,0xc2,0x3b,0xc9,0x40,0x30,0x3b,0x00,
347   0x51,0x09,0xc4,0x59,0x55,0x1e,0xf4,0x95,0x09,0xdf,0xde,0xe7,0x14,0x6c,0x3c,0x05,
348   0x00,0x6b,0x21,0x0b,0x53,0xd8,0x80,0x09,0x29,0x90,0x01,0x5a,0x7d,0x80,0x3d,0x14,
349   0xd1,0x40,0x07,0x3e,0x60,0xbe,0xf3,0xc1,0x85,0x23,0x0e,0x31,0x41,0x08,0x84,0x42,
350   0x02,0x1b,0x88,0xf7,0xa3,0xec,0xed,0xb3,0x13,0xb2,0x2c,0x7c,0x05,0x2a,0x60,0xa1,
351   0x0b,0x5b,0xa8,0x42,0x65,0x30,0xb3,0x13,0x7a,0x55,0x00,0x03,0x20,0xa8,0x92,0x16,
352   0xc3,0xc3,0x81,0x0d,0x70,0xe0,0x03,0xbd,0x0b,0x01,0x5c,0x5e,0xc0,0x82,0xca,0x8c,
353   0x98,0xac,0xd2,0xb3,0xde,0xa8,0xb3,0x40,0x74,0x2e,0x78,0x01,0x0b,0x4e,0xa0,0xd5,
354   0x08,0xbc,0x86,0xa5,0x01,0xfa,0x66,0x69,0x2c,0x18,0x15,0xfc,0x2e,0xb0,0x81,0xa1,
355   0xa4,0x80,0x05,0x35,0x30,0x09,0x10,0x5c,0x65,0x94,0x1a,0xf8,0xa0,0xcf,0x28,0x56,
356   0x2e,0x80,0xad,0x80,0x85,0x83,0x3f,0x61,0x08,0x39,0xbb,0xcb,0x09,0x78,0x47,0x69,
357   0x11,0x8a,0xc0,0x04,0x22,0xa8,0xb9,0x06,0x66,0xab,0x02,0xc3,0xe0,0xc0,0x07,0x46,
358   0xc8,0x7b,0x61,0x83,0x50,0x62,0x12,0xec,0xd1,0xb0,0x29,0x61,0xee,0x14,0xa8,0xf0,
359   0x67,0x45,0xe6,0x1b,0x2a,0x2a,0xa8,0x4c,0x57,0x70,0x1e,0x83,0xe5,0xcc,0x00,0x88,
360   0x6b,0x72,0x0d,0xeb,0x8c,0x20,0x56,0x1d,0xe8,0xf3,0xcb,0x18,0x88,0xb5,0x55,0x84,
361   0x60,0x84,0x7d,0xf2,0x96,0xb7,0x51,0x30,0x82,0x0e,0x02,0x02,0x00,0x3b
362   };
363 
364 
365 #define O FXRGBA(0,0,0,0)
366 #define R FXRGBA(255,0,0,128)
367 #define G FXRGBA(0,255,0,128)
368 #define B FXRGBA(0,0,255,128)
369 
370 static const FXColor cursordata[]={
371   R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,
372   R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,
373   R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,
374   R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,
375   R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,
376   G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,
377   G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,
378   G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,
379   G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,
380   G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,
381   B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,
382   B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,
383   B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,
384   B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,
385   B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,
386   O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O
387   };
388 
389 #undef O
390 #undef B
391 #undef G
392 #undef R
393 
394 const unsigned char copycursor[]={
395   0x00,0x00,0x02,0x00,0x02,0x00,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x01,
396   0x00,0x00,0x26,0x00,0x00,0x00,0x10,0x10,0x00,0x00,0x01,0x00,0x01,0x00,0xb0,0x00,
397   0x00,0x00,0x56,0x01,0x00,0x00,0x28,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x40,0x00,
398   0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
399   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
400   0x00,0x00,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x05,
401   0x00,0x00,0x00,0x08,0x80,0x00,0x00,0x10,0x40,0x00,0x00,0x4d,0x90,0x00,0x00,0xa5,
402   0x28,0x00,0x01,0x3d,0xe4,0x00,0x02,0x00,0x02,0x00,0x01,0x3d,0xe4,0x00,0x00,0xa5,
403   0x28,0x00,0x00,0x4d,0x90,0x00,0x00,0x10,0x40,0x00,0x00,0xc8,0x80,0x00,0x00,0xc5,
404   0x00,0x00,0x01,0x82,0x00,0x00,0x01,0x80,0x00,0x00,0x03,0x00,0x00,0x00,0x43,0x00,
405   0x00,0x00,0x66,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,0x7f,0xc0,
406   0x00,0x00,0x7f,0x80,0x00,0x00,0x7f,0x00,0x00,0x00,0x7e,0x10,0x00,0x00,0x7c,0x28,
407   0x00,0x00,0x78,0x6c,0x00,0x00,0x70,0x82,0x00,0x00,0x60,0x6c,0x00,0x00,0x40,0x28,
408   0x00,0x00,0x00,0x10,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xfd,0xff,0xff,0xff,0xf8,
409   0xff,0xff,0xff,0xf0,0x7f,0xff,0xff,0xe0,0x3f,0xff,0xff,0xb0,0x6f,0xff,0xff,0x18,
410   0xc7,0xff,0xfe,0x00,0x03,0xff,0xfc,0x00,0x01,0xff,0xfe,0x00,0x03,0xff,0xff,0x18,
411   0xc7,0xff,0xff,0xb0,0x6f,0xff,0xff,0x20,0x3f,0xff,0xfe,0x10,0x7f,0xff,0xfe,0x18,
412   0xff,0xff,0xfc,0x3d,0xff,0xff,0x7c,0x3f,0xff,0xff,0x38,0x7f,0xff,0xff,0x10,0x7f,
413   0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x0f,0xff,0xff,0x00,0x1f,
414   0xff,0xff,0x00,0x3f,0xff,0xff,0x00,0x7f,0xff,0xff,0x00,0xef,0xff,0xff,0x01,0xc7,
415   0xff,0xff,0x03,0x83,0xff,0xff,0x07,0x01,0xff,0xff,0x0f,0x83,0xff,0xff,0x1f,0xc7,
416   0xff,0xff,0x3f,0xef,0xff,0xff,0x28,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x20,0x00,
417   0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,
418   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
419   0x00,0x00,0xff,0xff,0xff,0x00,0x07,0x80,0x00,0x00,0x04,0x80,0x00,0x00,0x84,0x80,
420   0x00,0x00,0xc9,0x00,0x00,0x00,0xa9,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x83,0xe0,
421   0x00,0x00,0x80,0x40,0x00,0x00,0x80,0x80,0x00,0x00,0x81,0x20,0x00,0x00,0x82,0x50,
422   0x00,0x00,0x84,0xd8,0x00,0x00,0x89,0x04,0x00,0x00,0x90,0xd8,0x00,0x00,0xa0,0x50,
423   0x00,0x00,0xc0,0x20,0x00,0x00,0xf8,0x7f,0x00,0x00,0xf8,0x7f,0x00,0x00,0x78,0x7f,
424   0x00,0x00,0x30,0xff,0x00,0x00,0x10,0xff,0x00,0x00,0x01,0xff,0x00,0x00,0x00,0x1f,
425   0x00,0x00,0x00,0x3f,0x00,0x00,0x00,0x7f,0x00,0x00,0x00,0xdf,0x00,0x00,0x01,0x8f,
426   0x00,0x00,0x03,0x07,0x00,0x00,0x06,0x03,0x00,0x00,0x0f,0x07,0x00,0x00,0x1f,0x8f,
427   0x00,0x00,0x3f,0xdf,0x00,0x00
428   };
429 
430 /*******************************************************************************/
431 
432 // Device context demo application
433 // When complete, this demo should show off aspects of the FXDC API, such as:
434 // -> points
435 // -> lines (with various line styles, end caps and join styles)
436 // -> rectangles (filled and unfilled)
437 // -> arcs (filled and unfilled)
438 // -> polygons (filled and unfilled)
439 // -> fill patterns and built-in stipple patterns
440 // -> various blitting modes
441 // -> drawing images, icons and bitmaps
442 // -> clipping
443 // -> and so much more...
444 
445 class DCTestWindow : public FXMainWindow {
446   FXDECLARE(DCTestWindow)
447 private:
DCTestWindow()448   DCTestWindow(){}
449   DCTestWindow(const DCTestWindow&);
450   DCTestWindow& operator=(const DCTestWindow&);
451 
452 protected:
453 
454   // Drawing parameters
455   FXFunction         function;        // BLIT function
456   FXLineStyle	     lineStyle;       // Line style
457   FXCapStyle	     capStyle;        // Cap style
458   FXJoinStyle	     joinStyle;       // Join style
459   FXFillStyle        fillStyle;       // Filling style
460   FXFillRule         fillRule;        // Polygon fill rule
461   FXColor            forecolor;       // Foreground color
462   FXColor            backcolor;       // Background color
463   FXColor            erasecolor;      // Canvas erased color
464   FXStipplePattern   stipple;         // Stipple pattern
465   FXImage	    *birdImage;       // Test image
466   FXImage	    *textureImage;    // Texture image
467   FXFont            *testFont;        // Test font
468   FXFont            *testFontAngle;   // Test font at angle
469   FXBitmap          *bitmap;          // Test bitmap
470   FXint              ang1;            // Arc angle 1
471   FXint              ang2;            // Arc angle 2
472   FXint              cornerw;         // Corner width
473   FXint              cornerh;         // Corner height
474 
475   // Widgets
476   FXCanvas          *linesCanvas;
477   FXCanvas          *shapesCanvas;
478   FXCanvas          *imagesCanvas;
479   FXSpinner         *lineWidthSpinner;
480   FXColorWell       *backWell;
481   FXColorWell       *foreWell;
482   FXColorWell       *eraseWell;
483   FXPopup           *pop;
484   FXMenuPane        *filemenu;
485   FXDataTarget       ang1_target;
486   FXDataTarget       ang2_target;
487   FXDataTarget       cornerw_target;
488   FXDataTarget       cornerh_target;
489 
490   // Icons
491   FXIcon            *lssolid;
492   FXIcon            *lsonoffdash;
493   FXIcon            *lsdoubledash;
494   FXIcon            *cscapnotlast;
495   FXIcon            *cscapbutt;
496   FXIcon            *cscapround;
497   FXIcon            *cscapproj;
498   FXIcon            *jsmiter;
499   FXIcon            *jsround;
500   FXIcon            *jsbevel;
501 
502   // Cursor
503   FXCursor          *alphacursor;
504   FXCursor          *gifcursor;
505   FXCursor          *curcursor;
506 
507 public:
508 
509   // Draw page
510   void drawPage(FXDC& dc,FXint w,FXint h);
511 
512 public:
513   long onPaintLines(FXObject*,FXSelector,void*);
514   long onPaintShapes(FXObject*,FXSelector,void*);
515   long onPaintImages(FXObject*,FXSelector,void*);
516   long onLineWidth(FXObject*,FXSelector,void*);
517   long onCmdFunction(FXObject*,FXSelector,void*);
518   long onUpdFunction(FXObject*,FXSelector,void*);
519   long onCmdLineStyle(FXObject*,FXSelector,void*);
520   long onUpdLineStyle(FXObject*,FXSelector,void*);
521   long onCmdCapStyle(FXObject*,FXSelector,void*);
522   long onUpdCapStyle(FXObject*,FXSelector,void*);
523   long onCmdJoinStyle(FXObject*,FXSelector,void*);
524   long onUpdJoinStyle(FXObject*,FXSelector,void*);
525   long onCmdEraseColor(FXObject*,FXSelector,void*);
526   long onUpdEraseColor(FXObject*,FXSelector,void*);
527   long onCmdForeColor(FXObject*,FXSelector,void*);
528   long onUpdForeColor(FXObject*,FXSelector,void*);
529   long onCmdBackColor(FXObject*,FXSelector,void*);
530   long onUpdBackColor(FXObject*,FXSelector,void*);
531   long onCmdFont(FXObject*,FXSelector,void*);
532   long onCmdStipple(FXObject*,FXSelector,void*);
533   long onCmdFillStyle(FXObject*,FXSelector,void*);
534   long onUpdFillStyle(FXObject*,FXSelector,void*);
535   long onCmdPrint(FXObject*,FXSelector,void*);
536   long onCmdRedraw(FXObject*,FXSelector,void*);
537 public:
538   enum{
539     ID_LINES=FXMainWindow::ID_LAST,
540     ID_SHAPES,
541     ID_IMAGES,
542     ID_LINE_WIDTH,
543     ID_CLR,
544     ID_SRC_AND_DST,
545     ID_SRC_AND_NOT_DST,
546     ID_SRC,
547     ID_NOT_SRC_AND_DST,
548     ID_DST,
549     ID_SRC_XOR_DST,
550     ID_SRC_OR_DST,
551     ID_NOT_SRC_AND_NOT_DST,
552     ID_NOT_SRC_XOR_DST,
553     ID_NOT_DST,
554     ID_SRC_OR_NOT_DST,
555     ID_NOT_SRC,
556     ID_NOT_SRC_OR_DST,
557     ID_NOT_SRC_OR_NOT_DST,
558     ID_SET,
559     ID_LINE_SOLID,
560     ID_LINE_ONOFF_DASH,
561     ID_LINE_DOUBLE_DASH,
562     ID_CAP_NOT_LAST,
563     ID_CAP_BUTT,
564     ID_CAP_ROUND,
565     ID_CAP_PROJECTING,
566     ID_JOIN_MITER,
567     ID_JOIN_ROUND,
568     ID_JOIN_BEVEL,
569     ID_ERASE_COLOR,
570     ID_FORE_COLOR,
571     ID_BACK_COLOR,
572     ID_FONT,
573     ID_STIPPLE_0,
574     ID_STIPPLE_NONE=ID_STIPPLE_0,
575     ID_STIPPLE_BLACK=ID_STIPPLE_0,
576     ID_STIPPLE_1,
577     ID_STIPPLE_2,
578     ID_STIPPLE_3,
579     ID_STIPPLE_4,
580     ID_STIPPLE_5,
581     ID_STIPPLE_6,
582     ID_STIPPLE_7,
583     ID_STIPPLE_8,
584     ID_STIPPLE_GRAY=ID_STIPPLE_8,
585     ID_STIPPLE_9,
586     ID_STIPPLE_10,
587     ID_STIPPLE_11,
588     ID_STIPPLE_12,
589     ID_STIPPLE_13,
590     ID_STIPPLE_14,
591     ID_STIPPLE_15,
592     ID_STIPPLE_16,
593     ID_STIPPLE_WHITE=ID_STIPPLE_16,
594     ID_STIPPLE_HORZ,
595     ID_STIPPLE_VERT,
596     ID_STIPPLE_CROSS,
597     ID_STIPPLE_DIAG,
598     ID_STIPPLE_REVDIAG,
599     ID_STIPPLE_CROSSDIAG,
600     ID_FILL_SOLID,
601     ID_FILL_TILED,
602     ID_FILL_STIPPLED,
603     ID_FILL_OPAQUESTIPPLED,
604     ID_PRINT,
605     ID_REDRAW,
606     ID_LAST
607     };
608 public:
609   DCTestWindow(FXApp *app);
610   virtual void create();
611   virtual void detach();
612   virtual ~DCTestWindow();
613   };
614 
615 
616 /*******************************************************************************/
617 
618 // Message map
619 FXDEFMAP(DCTestWindow) DCTestWindowMap[]={
620   FXMAPFUNC(SEL_PAINT,    DCTestWindow::ID_LINES,                                           DCTestWindow::onPaintLines),
621   FXMAPFUNC(SEL_PAINT,    DCTestWindow::ID_SHAPES,                                          DCTestWindow::onPaintShapes),
622   FXMAPFUNC(SEL_PAINT,    DCTestWindow::ID_IMAGES,                                          DCTestWindow::onPaintImages),
623   FXMAPFUNC(SEL_COMMAND,  DCTestWindow::ID_FONT,                                            DCTestWindow::onCmdFont),
624   FXMAPFUNC(SEL_COMMAND,  DCTestWindow::ID_PRINT,                                           DCTestWindow::onCmdPrint),
625   FXMAPFUNC(SEL_COMMAND,  DCTestWindow::ID_ERASE_COLOR,                                     DCTestWindow::onCmdEraseColor),
626   FXMAPFUNC(SEL_CHANGED,  DCTestWindow::ID_ERASE_COLOR,                                     DCTestWindow::onCmdEraseColor),
627   FXMAPFUNC(SEL_UPDATE,   DCTestWindow::ID_ERASE_COLOR,                                     DCTestWindow::onUpdEraseColor),
628   FXMAPFUNC(SEL_COMMAND,  DCTestWindow::ID_FORE_COLOR,                                      DCTestWindow::onCmdForeColor),
629   FXMAPFUNC(SEL_CHANGED,  DCTestWindow::ID_FORE_COLOR,                                      DCTestWindow::onCmdForeColor),
630   FXMAPFUNC(SEL_UPDATE,   DCTestWindow::ID_FORE_COLOR,                                      DCTestWindow::onUpdForeColor),
631   FXMAPFUNC(SEL_COMMAND,  DCTestWindow::ID_BACK_COLOR,                                      DCTestWindow::onCmdBackColor),
632   FXMAPFUNC(SEL_CHANGED,  DCTestWindow::ID_BACK_COLOR,                                      DCTestWindow::onCmdBackColor),
633   FXMAPFUNC(SEL_UPDATE,   DCTestWindow::ID_BACK_COLOR,                                      DCTestWindow::onUpdBackColor),
634   FXMAPFUNC(SEL_COMMAND,  DCTestWindow::ID_LINE_WIDTH,                                      DCTestWindow::onLineWidth),
635   FXMAPFUNC(SEL_CHANGED,  DCTestWindow::ID_REDRAW,                                          DCTestWindow::onCmdRedraw),
636   FXMAPFUNC(SEL_COMMAND,  DCTestWindow::ID_REDRAW,                                          DCTestWindow::onCmdRedraw),
637   FXMAPFUNCS(SEL_COMMAND, DCTestWindow::ID_CLR,          DCTestWindow::ID_SET,              DCTestWindow::onCmdFunction),
638   FXMAPFUNCS(SEL_UPDATE,  DCTestWindow::ID_CLR,          DCTestWindow::ID_SET,              DCTestWindow::onUpdFunction),
639   FXMAPFUNCS(SEL_COMMAND, DCTestWindow::ID_LINE_SOLID,   DCTestWindow::ID_LINE_DOUBLE_DASH, DCTestWindow::onCmdLineStyle),
640   FXMAPFUNCS(SEL_UPDATE,  DCTestWindow::ID_LINE_SOLID,   DCTestWindow::ID_LINE_DOUBLE_DASH, DCTestWindow::onUpdLineStyle),
641   FXMAPFUNCS(SEL_COMMAND, DCTestWindow::ID_CAP_NOT_LAST, DCTestWindow::ID_CAP_PROJECTING,   DCTestWindow::onCmdCapStyle),
642   FXMAPFUNCS(SEL_UPDATE,  DCTestWindow::ID_CAP_NOT_LAST, DCTestWindow::ID_CAP_PROJECTING,   DCTestWindow::onUpdCapStyle),
643   FXMAPFUNCS(SEL_COMMAND, DCTestWindow::ID_JOIN_MITER,   DCTestWindow::ID_JOIN_BEVEL,       DCTestWindow::onCmdJoinStyle),
644   FXMAPFUNCS(SEL_UPDATE,  DCTestWindow::ID_JOIN_MITER,   DCTestWindow::ID_JOIN_BEVEL,       DCTestWindow::onUpdJoinStyle),
645   FXMAPFUNCS(SEL_COMMAND, DCTestWindow::ID_STIPPLE_0,    DCTestWindow::ID_STIPPLE_CROSSDIAG,DCTestWindow::onCmdStipple),
646   FXMAPFUNCS(SEL_COMMAND, DCTestWindow::ID_FILL_SOLID,DCTestWindow::ID_FILL_OPAQUESTIPPLED, DCTestWindow::onCmdFillStyle),
647   FXMAPFUNCS(SEL_UPDATE,  DCTestWindow::ID_FILL_SOLID,DCTestWindow::ID_FILL_OPAQUESTIPPLED, DCTestWindow::onUpdFillStyle),
648   };
649 
650 
651 // Object implementation
FXIMPLEMENT(DCTestWindow,FXMainWindow,DCTestWindowMap,ARRAYNUMBER (DCTestWindowMap))652 FXIMPLEMENT(DCTestWindow,FXMainWindow,DCTestWindowMap,ARRAYNUMBER(DCTestWindowMap))
653 
654 
655 /*******************************************************************************/
656 
657 
658 // Make some windows
659 DCTestWindow::DCTestWindow(FXApp *app):FXMainWindow(app,"Device Context Test",NULL,NULL,DECOR_ALL,0,0,900,820){
660 
661   // Preferred line attributes
662   lineStyle=LINE_SOLID;
663   capStyle=CAP_BUTT;
664   joinStyle=JOIN_MITER;
665 
666   // Tooltip
667   new FXToolTip(getApp());
668 
669   // Alpha cursor
670   alphacursor=new FXCursor(getApp(),cursordata,16,16,8,8);
671 
672   // GIF cursor
673   gifcursor=new FXGIFCursor(getApp(),minifolder,8,8);
674 
675   // CUR cursor
676   curcursor=new FXCURCursor(getApp(),copycursor);
677 
678   // Menubar
679   FXMenuBar *menubar=new FXMenuBar(this,LAYOUT_SIDE_TOP|LAYOUT_FILL_X);
680 
681   // Separator
682   new FXHorizontalSeparator(this,LAYOUT_SIDE_TOP|LAYOUT_FILL_X|SEPARATOR_GROOVE);
683 
684   // Contents
685   FXHorizontalFrame *contents=new FXHorizontalFrame(this,LAYOUT_SIDE_TOP|FRAME_NONE|LAYOUT_FILL_X|LAYOUT_FILL_Y|PACK_UNIFORM_WIDTH);
686 
687   // Controls on right
688   FXVerticalFrame *controls=new FXVerticalFrame(contents,LAYOUT_RIGHT|LAYOUT_FILL_Y);
689 
690   // Block for blit modes
691   new FXLabel(controls,"BLIT Function:",NULL,LAYOUT_LEFT);
692   FXMatrix *blitgrid=new FXMatrix(controls,4,FRAME_RIDGE|MATRIX_BY_COLUMNS|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH, 0,0,0,0, 2,2,2,2, 0,0);
693 
694   // One button for each mode
695   new FXButton(blitgrid,"Clear\tBLT_CLR",NULL,this,ID_CLR,BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
696   new FXButton(blitgrid,"And\tBLT_SRC_AND_DST",NULL,this,ID_SRC_AND_DST,BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
697   new FXButton(blitgrid,"AndRev\tBLT_SRC_AND_NOT_DST",NULL,this,ID_SRC_AND_NOT_DST,BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
698   new FXButton(blitgrid,"Copy\tBLT_SRC",NULL,this,ID_SRC,BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
699 
700   new FXButton(blitgrid,"AndInv\tBLT_NOT_SRC_AND_DST",NULL,this,ID_NOT_SRC_AND_DST,BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
701   new FXButton(blitgrid,"NoOp\tBLT_DST",NULL,this,ID_DST,BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
702   new FXButton(blitgrid,"Xor\tBLT_SRC_XOR_DST",NULL,this,ID_SRC_XOR_DST,BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
703   new FXButton(blitgrid,"Or\tBLT_SRC_OR_DST",NULL,this,ID_SRC_OR_DST,BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
704 
705   new FXButton(blitgrid,"Nor\tBLT_NOT_SRC_AND_NOT_DST",NULL,this,ID_NOT_SRC_AND_NOT_DST,BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
706   new FXButton(blitgrid,"Equiv\tBLT_NOT_SRC_XOR_DST",NULL,this,ID_NOT_SRC_XOR_DST,BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
707   new FXButton(blitgrid,"Invert\tBLT_NOT_DST",NULL,this,ID_NOT_DST,BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
708   new FXButton(blitgrid,"OrRev\tBLT_SRC_OR_NOT_DST",NULL,this,ID_SRC_OR_NOT_DST,BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
709 
710   new FXButton(blitgrid,"CopyInv\tBLT_NOT_SRC",NULL,this,ID_NOT_SRC,BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
711   new FXButton(blitgrid,"OrInv\tBLT_NOT_SRC_OR_DST",NULL,this,ID_NOT_SRC_OR_DST,BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
712   new FXButton(blitgrid,"Nand\tBLT_NOT_SRC_OR_NOT_DST",NULL,this,ID_NOT_SRC_OR_NOT_DST,BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
713   new FXButton(blitgrid,"Set\tBLT_SET",NULL,this,ID_SET,BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
714 
715   lssolid=new FXGIFIcon(getApp(),solid_line,0,IMAGE_OPAQUE);
716   lsonoffdash=new FXGIFIcon(getApp(),onoff_dash,FXRGB(0xb2,0xc0,0xdc),IMAGE_ALPHACOLOR);
717   lsdoubledash=new FXGIFIcon(getApp(),double_dash,0,IMAGE_OPAQUE);
718 
719   // Line Dash Style
720   new FXLabel(controls,"Line Style:",NULL,LAYOUT_LEFT);
721   FXMatrix *linestyle=new FXMatrix(controls,3,FRAME_RIDGE|MATRIX_BY_COLUMNS|LAYOUT_FILL_X, 0,0,0,0, 2,2,2,2, 0,0);
722   new FXButton(linestyle,"\tLINE_SOLID",lssolid,this,ID_LINE_SOLID,BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
723   new FXButton(linestyle,"\tLINE_ONOFF_DASH",lsonoffdash,this,ID_LINE_ONOFF_DASH,BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
724   new FXButton(linestyle,"\tLINE_DOUBLE_DASH",lsdoubledash,this,ID_LINE_DOUBLE_DASH,BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
725 
726   cscapnotlast=new FXGIFIcon(getApp(),capnotlast);
727   cscapbutt=new FXGIFIcon(getApp(),capbutt);
728   cscapround=new FXGIFIcon(getApp(),capround);
729   cscapproj=new FXGIFIcon(getApp(),capproj);
730 
731   // Line Cap Style
732   new FXLabel(controls,"Cap Style:",NULL,LAYOUT_LEFT);
733   FXMatrix *capstyle=new FXMatrix(controls,4,FRAME_RIDGE|MATRIX_BY_COLUMNS|LAYOUT_FILL_X, 0,0,0,0, 2,2,2,2, 0,0);
734   new FXButton(capstyle,"\tCAP_NOT_LAST",cscapnotlast,this,ID_CAP_NOT_LAST,BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
735   new FXButton(capstyle,"\tCAP_BUTT",cscapbutt,this,ID_CAP_BUTT,BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
736   new FXButton(capstyle,"\tCAP_ROUND",cscapround,this,ID_CAP_ROUND,BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
737   new FXButton(capstyle,"\tCAP_PROJECTING",cscapproj,this,ID_CAP_PROJECTING,BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
738 
739   jsmiter=new FXGIFIcon(getApp(),jmiter);
740   jsround=new FXGIFIcon(getApp(),jround);
741   jsbevel=new FXGIFIcon(getApp(),jbevel);
742 
743   // Line Join Style
744   new FXLabel(controls,"Join Style:",NULL,LAYOUT_LEFT);
745   FXMatrix *joinstyle=new FXMatrix(controls,3,FRAME_RIDGE|MATRIX_BY_COLUMNS|LAYOUT_FILL_X, 0,0,0,0, 2,2,2,2, 0,0);
746   new FXButton(joinstyle,"\tJOIN_MITER",jsmiter,this,ID_JOIN_MITER,BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
747   new FXButton(joinstyle,"\tJOIN_ROUND",jsround,this,ID_JOIN_ROUND,BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
748   new FXButton(joinstyle,"\tJOIN_BEVEL",jsbevel,this,ID_JOIN_BEVEL,BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
749 
750   // Colors
751   new FXLabel(controls,"Colors:",NULL,LAYOUT_LEFT);
752   FXMatrix *pairs=new FXMatrix(controls,2,FRAME_RIDGE|MATRIX_BY_COLUMNS|LAYOUT_FILL_X, 0,0,0,0, 2,2,2,2, 5,5);
753 
754   // Back Color
755   new FXLabel(pairs, "Back Color:");
756   backWell=new FXColorWell(pairs,FXRGB(0,0,255),this,ID_BACK_COLOR,FRAME_SUNKEN|FRAME_THICK|ICON_AFTER_TEXT|LAYOUT_FILL_X|LAYOUT_FILL_COLUMN);
757 
758   // Fore Color
759   new FXLabel(pairs, "Fore Color:");
760   foreWell=new FXColorWell(pairs,FXRGB(255,0,0),this,ID_FORE_COLOR,FRAME_SUNKEN|FRAME_THICK|ICON_AFTER_TEXT|LAYOUT_FILL_X|LAYOUT_FILL_COLUMN);
761 
762   // Erase Color
763   new FXLabel(pairs, "Erase Color:");
764   eraseWell=new FXColorWell(pairs,FXRGB(255,255,255),this,ID_ERASE_COLOR,FRAME_SUNKEN|FRAME_THICK|ICON_AFTER_TEXT|LAYOUT_FILL_X|LAYOUT_FILL_COLUMN);
765 
766   // Line weight
767   FXMatrix *linew=new FXMatrix(controls,2,FRAME_RIDGE|MATRIX_BY_COLUMNS|LAYOUT_FILL_X, 0,0,0,0, 2,2,2,2, 0,0);
768   new FXLabel(linew, "Line Width:");
769   lineWidthSpinner=new FXSpinner(linew,4,this,ID_LINE_WIDTH,SPIN_NORMAL|FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_COLUMN);
770   lineWidthSpinner->setRange(1,255);
771   lineWidthSpinner->setValue(1);
772 
773   // Stipple
774   FXMatrix *stip=new FXMatrix(controls,2,FRAME_RIDGE|MATRIX_BY_COLUMNS|LAYOUT_FILL_X, 0,0,0,0, 2,2,2,2, 0,0);
775   new FXLabel(stip, "Stipples:");
776   pop=new FXPopup(this);
777   new FXOption(pop,"NONE\tSTIPPLE_NONE",NULL,this,ID_STIPPLE_NONE,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
778   new FXOption(pop,"BLACK\tSTIPPLE_BLACK",NULL,this,ID_STIPPLE_BLACK,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
779   new FXOption(pop,"GRAY\tSTIPPLE_GRAY",NULL,this,ID_STIPPLE_GRAY,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
780   new FXOption(pop,"WHITE\tSTIPPLE_WHITE",NULL,this,ID_STIPPLE_WHITE,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
781   new FXOption(pop,"0\tSTIPPLE_0",NULL,this,ID_STIPPLE_0,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
782   new FXOption(pop,"1\tSTIPPLE_1",NULL,this,ID_STIPPLE_1,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
783   new FXOption(pop,"2\tSTIPPLE_2",NULL,this,ID_STIPPLE_2,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
784   new FXOption(pop,"3\tSTIPPLE_3",NULL,this,ID_STIPPLE_3,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
785   new FXOption(pop,"4\tSTIPPLE_4",NULL,this,ID_STIPPLE_4,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
786   new FXOption(pop,"5\tSTIPPLE_5",NULL,this,ID_STIPPLE_5,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
787   new FXOption(pop,"6\tSTIPPLE_6",NULL,this,ID_STIPPLE_6,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
788   new FXOption(pop,"7\tSTIPPLE_7",NULL,this,ID_STIPPLE_7,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
789   new FXOption(pop,"8\tSTIPPLE_8",NULL,this,ID_STIPPLE_8,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
790   new FXOption(pop,"9\tSTIPPLE_9",NULL,this,ID_STIPPLE_9,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
791   new FXOption(pop,"10\tSTIPPLE_10",NULL,this,ID_STIPPLE_10,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
792   new FXOption(pop,"11\tSTIPPLE_11",NULL,this,ID_STIPPLE_11,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
793   new FXOption(pop,"12\tSTIPPLE_12",NULL,this,ID_STIPPLE_12,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
794   new FXOption(pop,"13\tSTIPPLE_13",NULL,this,ID_STIPPLE_13,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
795   new FXOption(pop,"14\tSTIPPLE_14",NULL,this,ID_STIPPLE_14,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
796   new FXOption(pop,"15\tSTIPPLE_15",NULL,this,ID_STIPPLE_15,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
797   new FXOption(pop,"16\tSTIPPLE_16",NULL,this,ID_STIPPLE_16,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
798   new FXOption(pop,"HORZ\tSTIPPLE_HORZ",NULL,this,ID_STIPPLE_HORZ,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
799   new FXOption(pop,"VERT\tSTIPPLE_VERT",NULL,this,ID_STIPPLE_VERT,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
800   new FXOption(pop,"CROSS\tSTIPPLE_CROSS",NULL,this,ID_STIPPLE_CROSS,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
801   new FXOption(pop,"DIAG\tSTIPPLE_DIAG",NULL,this,ID_STIPPLE_DIAG,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
802   new FXOption(pop,"REVDIAG\tSTIPPLE_REVDIAG",NULL,this,ID_STIPPLE_REVDIAG,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
803   new FXOption(pop,"CROSSDIAG\tSTIPPLE_CROSSDIAG",NULL,this,ID_STIPPLE_CROSSDIAG,JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
804   new FXOptionMenu(stip,pop,LAYOUT_TOP|FRAME_RAISED|FRAME_THICK|JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
805 
806   // Fill Style
807   new FXLabel(controls,"Fill Style:",NULL,LAYOUT_LEFT);
808   FXMatrix *fillstyle=new FXMatrix(controls,2,FRAME_RIDGE|MATRIX_BY_COLUMNS|LAYOUT_FILL_X, 0,0,0,0, 2,2,2,2, 0,0);
809   new FXButton(fillstyle,"FILL_SOLID",NULL,this,ID_FILL_SOLID,BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
810   new FXButton(fillstyle,"FILL_TILED",NULL,this,ID_FILL_TILED,BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
811   new FXButton(fillstyle,"FILL_STIPPLED",NULL,this,ID_FILL_STIPPLED,BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
812   new FXButton(fillstyle,"FILL_OPAQUESTIPPLED",NULL,this,ID_FILL_OPAQUESTIPPLED,BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
813 
814   // Angles for arcs
815   new FXLabel(controls,"Arc angles:",NULL,LAYOUT_LEFT);
816   FXMatrix *arcangles=new FXMatrix(controls,3,FRAME_RIDGE|MATRIX_BY_COLUMNS|LAYOUT_FILL_X, 0,0,0,0, 2,2,2,2, 4,4);
817 
818   new FXLabel(arcangles,"Ang1:",NULL,LAYOUT_LEFT);
819   new FXTextField(arcangles,4,&ang1_target,FXDataTarget::ID_VALUE,TEXTFIELD_INTEGER|JUSTIFY_RIGHT|FRAME_SUNKEN|FRAME_THICK);
820   FXSlider* sang1=new FXSlider(arcangles,&ang1_target,FXDataTarget::ID_VALUE,LAYOUT_CENTER_Y|LAYOUT_FILL_X|SLIDER_INSIDE_BAR|LAYOUT_FILL_COLUMN);
821   sang1->setRange(-360,360);
822 
823   new FXLabel(arcangles,"Ang2:",NULL,LAYOUT_LEFT);
824   new FXTextField(arcangles,4,&ang2_target,FXDataTarget::ID_VALUE,TEXTFIELD_INTEGER|JUSTIFY_RIGHT|FRAME_SUNKEN|FRAME_THICK);
825   FXSlider* sang2=new FXSlider(arcangles,&ang2_target,FXDataTarget::ID_VALUE,LAYOUT_CENTER_Y|LAYOUT_FILL_X|SLIDER_INSIDE_BAR|LAYOUT_FILL_COLUMN);
826   sang2->setRange(-360,360);
827 
828   // Radii for rounded rectangles
829   new FXLabel(controls,"Radii:",NULL,LAYOUT_LEFT);
830   FXMatrix *radii=new FXMatrix(controls,3,FRAME_RIDGE|MATRIX_BY_COLUMNS|LAYOUT_FILL_X, 0,0,0,0, 2,2,2,2, 4,4);
831 
832   new FXLabel(radii,"Crnw:",NULL,LAYOUT_LEFT);
833   new FXTextField(radii,4,&cornerw_target,FXDataTarget::ID_VALUE,TEXTFIELD_INTEGER|JUSTIFY_RIGHT|FRAME_SUNKEN|FRAME_THICK);
834   FXSlider* scornw=new FXSlider(radii,&cornerw_target,FXDataTarget::ID_VALUE,LAYOUT_CENTER_Y|LAYOUT_FILL_X|SLIDER_INSIDE_BAR|LAYOUT_FILL_COLUMN);
835   scornw->setRange(0,100);
836 
837   new FXLabel(radii,"Crnh:",NULL,LAYOUT_LEFT);
838   new FXTextField(radii,4,&cornerh_target,FXDataTarget::ID_VALUE,TEXTFIELD_INTEGER|JUSTIFY_RIGHT|FRAME_SUNKEN|FRAME_THICK);
839   FXSlider* scornh=new FXSlider(radii,&cornerh_target,FXDataTarget::ID_VALUE,LAYOUT_CENTER_Y|LAYOUT_FILL_X|SLIDER_INSIDE_BAR|LAYOUT_FILL_COLUMN);
840   scornh->setRange(0,100);
841 
842   // Font
843   FXHorizontalFrame *fonts=new FXHorizontalFrame(controls,FRAME_RIDGE|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH, 0,0,0,0, 2,2,2,2, 0,0);
844   new FXButton(fonts,"Font Dialog...\tChange the text font",NULL,this,ID_FONT,BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y);
845 
846   // Printing
847   FXHorizontalFrame *printer=new FXHorizontalFrame(controls,FRAME_RIDGE|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH, 0,0,0,0, 2,2,2,2, 0,0);
848   new FXButton(printer,"Print Dialog...\tPrint it out",NULL,this,ID_PRINT,BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y);
849 
850   // Quit
851   FXHorizontalFrame *quitter=new FXHorizontalFrame(controls,FRAME_RIDGE|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH, 0,0,0,0, 2,2,2,2, 0,0);
852   new FXButton(quitter,"Bye Bye!",NULL,getApp(),FXApp::ID_QUIT,BUTTON_TOOLBAR|JUSTIFY_CENTER_X|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_FILL_Y);
853 
854 
855   // Switcher
856   FXTabBook *tabbook=new FXTabBook(contents,NULL,0,LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_RIGHT);
857 
858   // First page shows various line styles
859   new FXTabItem(tabbook,"&Lines",NULL);
860   FXPacker *linesPage=new FXPacker(tabbook,FRAME_THICK|FRAME_RAISED);
861 
862 
863   FXHorizontalFrame* frame=new FXHorizontalFrame(linesPage,FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y,0,0,0,0, 0,0,0,0);
864   linesCanvas=new FXCanvas(frame,this,ID_LINES,LAYOUT_FILL_X|LAYOUT_FILL_Y);
865 
866   // Set special cursor
867   linesCanvas->setDefaultCursor(alphacursor);
868   linesCanvas->setDragCursor(alphacursor);
869 
870   // Second page shows different shapes
871   new FXTabItem(tabbook,"&Shapes",NULL);
872   FXPacker *shapesPage=new FXPacker(tabbook,FRAME_THICK|FRAME_RAISED);
873   frame=new FXHorizontalFrame(shapesPage,FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y,0,0,0,0, 0,0,0,0);
874   shapesCanvas=new FXCanvas(frame,this,ID_SHAPES,LAYOUT_FILL_X|LAYOUT_FILL_Y);
875 
876   // Set special cursor
877   shapesCanvas->setDefaultCursor(gifcursor);
878   shapesCanvas->setDragCursor(gifcursor);
879 
880   // Third page shows images
881   new FXTabItem(tabbook,"&Images",NULL);
882   FXPacker *imagesPage=new FXPacker(tabbook,FRAME_THICK|FRAME_RAISED);
883   frame=new FXHorizontalFrame(imagesPage,FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y,0,0,0,0, 0,0,0,0);
884   imagesCanvas=new FXCanvas(frame,this,ID_IMAGES,LAYOUT_FILL_X|LAYOUT_FILL_Y);
885 
886   // Set special cursor
887   imagesCanvas->setDefaultCursor(curcursor);
888   imagesCanvas->setDragCursor(curcursor);
889 
890   // File Menu
891   filemenu=new FXMenuPane(this);
892   new FXMenuCommand(filemenu,"&Print...\tCtl-P",NULL,this,ID_PRINT);
893   new FXMenuCommand(filemenu,"&Font...\tCtl-F",NULL,this,ID_FONT);
894   new FXMenuCommand(filemenu,"&Quit\tCtl-Q",NULL,getApp(),FXApp::ID_QUIT);
895   new FXMenuTitle(menubar,"&File",NULL,filemenu);
896 
897   birdImage=new FXGIFImage(getApp(),dippy);
898   textureImage=new FXGIFImage(getApp(),slate);
899   bitmap=new FXBitmap(getApp(),bitmap_bits,0,bitmap_width,bitmap_height);
900 
901   function=BLT_SRC;
902   lineStyle=LINE_SOLID;
903   capStyle=CAP_BUTT;
904   joinStyle=JOIN_MITER;
905   fillStyle=FILL_SOLID;
906   fillRule=RULE_EVEN_ODD;
907   stipple=STIPPLE_NONE;
908   forecolor=FXRGB(255,0,0);
909   backcolor=FXRGB(0,0,255);
910   erasecolor=FXRGB(255,255,255);
911   ang1=0;
912   ang2=90;
913   testFont=new FXFont(getApp(),"helvetica",20,FXFont::Normal,FXFont::Straight,FONTENCODING_DEFAULT,FXFont::NonExpanded,FXFont::Scalable|FXFont::Rotatable);
914   testFontAngle=new FXFont(getApp(),"helvetica",20,FXFont::Normal,FXFont::Straight,FONTENCODING_DEFAULT,FXFont::NonExpanded,FXFont::Scalable|FXFont::Rotatable);
915   testFontAngle->setAngle(90*64);
916 //  testFontAngle->setAngle(45*64);
917   ang1_target.connect(ang1);
918   ang1_target.setTarget(this);
919   ang1_target.setSelector(ID_REDRAW);
920   ang2_target.connect(ang2);
921   ang2_target.setTarget(this);
922   ang2_target.setSelector(ID_REDRAW);
923 
924   cornerw=10;
925   cornerh=10;
926 
927   cornerw_target.connect(cornerw);
928   cornerw_target.setTarget(this);
929   cornerw_target.setSelector(ID_REDRAW);
930   cornerh_target.connect(cornerh);
931   cornerh_target.setTarget(this);
932   cornerh_target.setSelector(ID_REDRAW);
933 
934   }
935 
936 
937 // Clean up
~DCTestWindow()938 DCTestWindow::~DCTestWindow(){
939   delete testFont;
940   delete testFontAngle;
941   delete birdImage;
942   delete textureImage;
943   delete bitmap;
944   delete filemenu;
945   delete pop;
946   delete lssolid;
947   delete lsonoffdash;
948   delete lsdoubledash;
949   delete cscapnotlast;
950   delete cscapbutt;
951   delete cscapround;
952   delete cscapproj;
953   delete jsmiter;
954   delete jsround;
955   delete jsbevel;
956   delete alphacursor;
957   delete gifcursor;
958   delete curcursor;
959   }
960 
961 
962 // Create
create()963 void DCTestWindow::create(){
964   FXMainWindow::create();
965   birdImage->create();
966   textureImage->create();
967   testFont->create();
968   testFontAngle->create();
969   bitmap->create();
970   alphacursor->create();
971   gifcursor->create();
972   curcursor->create();
973   show(PLACEMENT_SCREEN);
974   }
975 
976 
977 // Detach
detach()978 void DCTestWindow::detach(){
979   FXMainWindow::detach();
980   birdImage->detach();
981   textureImage->detach();
982   testFont->detach();
983   testFontAngle->detach();
984   bitmap->detach();
985   }
986 
987 
988 // Changed RasterOp function
onCmdFunction(FXObject *,FXSelector sel,void *)989 long DCTestWindow::onCmdFunction(FXObject*,FXSelector sel,void*){
990   function=(FXFunction)(BLT_CLR+FXSELID(sel)-ID_CLR);
991   linesCanvas->update(0,0,linesCanvas->getWidth(),linesCanvas->getHeight());
992   return 1;
993   }
994 
995 // Update RasterOp function
onUpdFunction(FXObject * sender,FXSelector sel,void *)996 long DCTestWindow::onUpdFunction(FXObject* sender,FXSelector sel,void*){
997   FXFunction ff=(FXFunction)(BLT_CLR+FXSELID(sel)-ID_CLR);
998   if(ff==function)
999     sender->handle(this,FXSEL(SEL_COMMAND,ID_CHECK),NULL);
1000   else
1001     sender->handle(this,FXSEL(SEL_COMMAND,ID_UNCHECK),NULL);
1002   return 1;
1003   }
1004 
1005 
1006 // Changed Line Style
onCmdLineStyle(FXObject *,FXSelector sel,void *)1007 long DCTestWindow::onCmdLineStyle(FXObject*,FXSelector sel,void*){
1008   lineStyle=(FXLineStyle)(LINE_SOLID+FXSELID(sel)-ID_LINE_SOLID);
1009   linesCanvas->update(0,0,linesCanvas->getWidth(),linesCanvas->getHeight());
1010   return 1;
1011   }
1012 
1013 // Update Line Style
onUpdLineStyle(FXObject * sender,FXSelector sel,void *)1014 long DCTestWindow::onUpdLineStyle(FXObject* sender,FXSelector sel,void*){
1015   FXLineStyle ff=(FXLineStyle)(LINE_SOLID+FXSELID(sel)-ID_LINE_SOLID);
1016   if(ff==lineStyle)
1017     sender->handle(this,FXSEL(SEL_COMMAND,ID_CHECK),NULL);
1018   else
1019     sender->handle(this,FXSEL(SEL_COMMAND,ID_UNCHECK),NULL);
1020   return 1;
1021   }
1022 
1023 
1024 // Changed Cap Style
onCmdCapStyle(FXObject *,FXSelector sel,void *)1025 long DCTestWindow::onCmdCapStyle(FXObject*,FXSelector sel,void*){
1026   capStyle=(FXCapStyle)(CAP_NOT_LAST+FXSELID(sel)-ID_CAP_NOT_LAST);
1027   linesCanvas->update(0,0,linesCanvas->getWidth(),linesCanvas->getHeight());
1028   return 1;
1029   }
1030 
1031 // Update Cap Style
onUpdCapStyle(FXObject * sender,FXSelector sel,void *)1032 long DCTestWindow::onUpdCapStyle(FXObject* sender,FXSelector sel,void*){
1033   FXCapStyle ff=(FXCapStyle)(CAP_NOT_LAST+FXSELID(sel)-ID_CAP_NOT_LAST);
1034   if(ff==capStyle)
1035     sender->handle(this,FXSEL(SEL_COMMAND,ID_CHECK),NULL);
1036   else
1037     sender->handle(this,FXSEL(SEL_COMMAND,ID_UNCHECK),NULL);
1038   return 1;
1039   }
1040 
1041 // Changed Join Style
onCmdJoinStyle(FXObject *,FXSelector sel,void *)1042 long DCTestWindow::onCmdJoinStyle(FXObject*,FXSelector sel,void*){
1043   joinStyle=(FXJoinStyle)(JOIN_MITER+FXSELID(sel)-ID_JOIN_MITER);
1044   linesCanvas->update(0,0,linesCanvas->getWidth(),linesCanvas->getHeight());
1045   return 1;
1046   }
1047 
1048 // Update Join Style
onUpdJoinStyle(FXObject * sender,FXSelector sel,void *)1049 long DCTestWindow::onUpdJoinStyle(FXObject* sender,FXSelector sel,void*){
1050   FXJoinStyle ff=(FXJoinStyle)(JOIN_MITER+FXSELID(sel)-ID_JOIN_MITER);
1051   if(ff==joinStyle)
1052     sender->handle(this,FXSEL(SEL_COMMAND,ID_CHECK),NULL);
1053   else
1054     sender->handle(this,FXSEL(SEL_COMMAND,ID_UNCHECK),NULL);
1055   return 1;
1056   }
1057 
1058 
1059 // Erase Color
onCmdEraseColor(FXObject *,FXSelector,void * ptr)1060 long DCTestWindow::onCmdEraseColor(FXObject*,FXSelector,void* ptr){
1061   erasecolor=(FXColor)(FXuval)ptr;
1062   linesCanvas->update();
1063   shapesCanvas->update();
1064   imagesCanvas->update();
1065   return 1;
1066   }
1067 
1068 // Update Erase Color
onUpdEraseColor(FXObject * sender,FXSelector,void *)1069 long DCTestWindow::onUpdEraseColor(FXObject* sender,FXSelector,void*){
1070   sender->handle(this,FXSEL(SEL_COMMAND,ID_SETVALUE),(void*)(FXuint)erasecolor);
1071   return 1;
1072   }
1073 
1074 
1075 // Foreground Color
onCmdForeColor(FXObject *,FXSelector,void * ptr)1076 long DCTestWindow::onCmdForeColor(FXObject*,FXSelector,void* ptr){
1077   forecolor=(FXColor)(FXuval)ptr;
1078   linesCanvas->update();
1079   shapesCanvas->update();
1080   imagesCanvas->update();
1081   return 1;
1082   }
1083 
1084 
1085 // Update Foreground Color
onUpdForeColor(FXObject * sender,FXSelector,void *)1086 long DCTestWindow::onUpdForeColor(FXObject* sender,FXSelector,void*){
1087   sender->handle(this,FXSEL(SEL_COMMAND,ID_SETVALUE),(void*)(FXuint)forecolor);
1088   return 1;
1089   }
1090 
1091 // Back Color
onCmdBackColor(FXObject *,FXSelector,void * ptr)1092 long DCTestWindow::onCmdBackColor(FXObject*,FXSelector,void* ptr){
1093   backcolor=(FXColor)(FXuval)ptr;
1094   linesCanvas->update();
1095   shapesCanvas->update();
1096   imagesCanvas->update();
1097   return 1;
1098   }
1099 
1100 
1101 // Update Back Color
onUpdBackColor(FXObject * sender,FXSelector,void *)1102 long DCTestWindow::onUpdBackColor(FXObject* sender,FXSelector,void*){
1103   sender->handle(this,FXSEL(SEL_COMMAND,ID_SETVALUE),(void*)(FXuint)backcolor);
1104   return 1;
1105   }
1106 
1107 
1108 // Change font
onCmdFont(FXObject *,FXSelector,void *)1109 long DCTestWindow::onCmdFont(FXObject*,FXSelector,void*){
1110   FXFontDialog fontdlg(this,"Change Font",DECOR_BORDER|DECOR_TITLE);
1111   FXFontDesc fontdesc;
1112   testFont->getFontDesc(fontdesc);
1113   fontdlg.setFontSelection(fontdesc);
1114   if(fontdlg.execute()){
1115     fontdlg.getFontSelection(fontdesc);
1116     delete testFont;
1117     delete testFontAngle;
1118     testFont=new FXFont(getApp(),fontdesc);
1119     testFont->create();
1120     testFontAngle=new FXFont(getApp(),fontdesc);
1121     testFontAngle->setAngle(90*64);
1122     testFontAngle->create();
1123     linesCanvas->update(0,0,linesCanvas->getWidth(),linesCanvas->getHeight());
1124     }
1125   return 1;
1126   }
1127 
1128 
1129 // User changes the line width
onLineWidth(FXObject *,FXSelector,void *)1130 long DCTestWindow::onLineWidth(FXObject*,FXSelector,void*){
1131   linesCanvas->update();
1132   return 1;
1133   }
1134 
1135 
1136 // Change stipple
onCmdStipple(FXObject *,FXSelector sel,void *)1137 long DCTestWindow::onCmdStipple(FXObject*,FXSelector sel,void*){
1138   stipple=(FXStipplePattern)(STIPPLE_NONE+FXSELID(sel)-ID_STIPPLE_0);
1139   linesCanvas->update();
1140   shapesCanvas->update();
1141   return 1;
1142   }
1143 
1144 
1145 // Changed Fill Style
onCmdFillStyle(FXObject *,FXSelector sel,void *)1146 long DCTestWindow::onCmdFillStyle(FXObject*,FXSelector sel,void*){
1147   fillStyle=(FXFillStyle)(FILL_SOLID+FXSELID(sel)-ID_FILL_SOLID);
1148   linesCanvas->update();
1149   shapesCanvas->update();
1150   return 1;
1151   }
1152 
1153 // Update Fill Style
onUpdFillStyle(FXObject * sender,FXSelector sel,void *)1154 long DCTestWindow::onUpdFillStyle(FXObject* sender,FXSelector sel,void*){
1155   FXFillStyle ff=(FXFillStyle)(FILL_SOLID+FXSELID(sel)-ID_FILL_SOLID);
1156   if(ff==fillStyle)
1157     sender->handle(this,FXSEL(SEL_COMMAND,ID_CHECK),NULL);
1158   else
1159     sender->handle(this,FXSEL(SEL_COMMAND,ID_UNCHECK),NULL);
1160   return 1;
1161   }
1162 
1163 
1164 // Redraw
onCmdRedraw(FXObject *,FXSelector,void *)1165 long DCTestWindow::onCmdRedraw(FXObject*,FXSelector,void*){
1166   linesCanvas->update(0,0,linesCanvas->getWidth(),linesCanvas->getHeight());
1167   return 1;
1168   }
1169 
1170 
1171 // Repaint the lines page
onPaintLines(FXObject * sender,FXSelector,void * ptr)1172 long DCTestWindow::onPaintLines(FXObject *sender,FXSelector,void *ptr){
1173   FXCanvas *canvas=(FXCanvas*) sender;
1174   FXEvent *ev=(FXEvent*)ptr;
1175   FXDCWindow dc(canvas,ev);
1176   drawPage(dc,canvas->getWidth(),canvas->getHeight());
1177   return 1;
1178   }
1179 
1180 
1181 // Repaint the shapes page
onPaintShapes(FXObject * sender,FXSelector,void * ptr)1182 long DCTestWindow::onPaintShapes(FXObject *sender,FXSelector,void *ptr){
1183   FXCanvas *canvas=(FXCanvas*)sender;
1184   FXEvent *ev=(FXEvent*)ptr;
1185   FXDCWindow dc(canvas,ev);
1186   dc.setForeground(eraseWell->getRGBA());
1187   dc.fillRectangle(0,0,canvas->getWidth(),canvas->getHeight());
1188 
1189   dc.setForeground(foreWell->getRGBA());
1190   dc.setBackground(backWell->getRGBA());
1191   dc.drawRectangle(5,5,50,50);
1192   dc.fillRectangle(60,5,50,50);
1193 
1194   dc.setForeground(foreWell->getRGBA());
1195   dc.setBackground(backWell->getRGBA());
1196   dc.drawArc(5,60,50,50,0,64*90);
1197   dc.fillArc(60,60,50,50,64*90,64*180);
1198 
1199   dc.setForeground(foreWell->getRGBA());
1200   dc.setBackground(backWell->getRGBA());
1201   dc.drawBitmap(bitmap,115,5);
1202 
1203   FXPoint poly_letter[10];
1204 
1205   // Letter 'F'
1206   poly_letter[0].x=0;  poly_letter[0].y=0;
1207   poly_letter[1].x=45; poly_letter[1].y=0;
1208   poly_letter[2].x=45; poly_letter[2].y=15;
1209   poly_letter[3].x=15; poly_letter[3].y=15;
1210   poly_letter[4].x=15; poly_letter[4].y=30;
1211   poly_letter[5].x=30; poly_letter[5].y=30;
1212   poly_letter[6].x=30; poly_letter[6].y=45;
1213   poly_letter[7].x=15; poly_letter[7].y=45;
1214   poly_letter[8].x=15; poly_letter[8].y=75;
1215   poly_letter[9].x=0;  poly_letter[9].y=75;
1216 
1217   // Region for F
1218   FXRegion letter_F(poly_letter,10);
1219 
1220   // Letter O outside
1221   poly_letter[0].x=15; poly_letter[0].y=0;
1222   poly_letter[1].x=30; poly_letter[1].y=0;
1223   poly_letter[2].x=45; poly_letter[2].y=15;
1224   poly_letter[3].x=45; poly_letter[3].y=60;
1225   poly_letter[4].x=30; poly_letter[4].y=75;
1226   poly_letter[5].x=15; poly_letter[5].y=75;
1227   poly_letter[6].x=0;  poly_letter[6].y=60;
1228   poly_letter[7].x=0;  poly_letter[7].y=15;
1229 
1230   // Region for outer O
1231   FXRegion letter_O(poly_letter,8);
1232 
1233   // Letter O inside
1234   poly_letter[0].x=22; poly_letter[0].y=15;
1235   poly_letter[1].x=30; poly_letter[1].y=22;
1236   poly_letter[2].x=30; poly_letter[2].y=53;
1237   poly_letter[3].x=22; poly_letter[3].y=60;
1238   poly_letter[4].x=15; poly_letter[4].y=53;
1239   poly_letter[5].x=15; poly_letter[5].y=22;
1240 
1241   // Substract inner O
1242   letter_O -= FXRegion(poly_letter,6);
1243 
1244   // Letter X left slant
1245   poly_letter[0].x=0;  poly_letter[0].y=0;
1246   poly_letter[1].x=15; poly_letter[1].y=0;
1247   poly_letter[2].x=45; poly_letter[2].y=75;
1248   poly_letter[3].x=30; poly_letter[3].y=75;
1249 
1250   // Region for X
1251   FXRegion letter_X(poly_letter,4);
1252 
1253   // Letter X right slant
1254   poly_letter[0].x=0;  poly_letter[0].y=75;
1255   poly_letter[1].x=15; poly_letter[1].y=75;
1256   poly_letter[2].x=45; poly_letter[2].y=0;
1257   poly_letter[3].x=30; poly_letter[3].y=0;
1258 
1259   // Add slants together
1260   letter_X += FXRegion(poly_letter,4);
1261 
1262   // Make the word "FOX"
1263   FXRegion word_FOX=letter_F.offset(100,100)+letter_O.offset(150,100)+letter_X.offset(200,100);
1264 
1265   // Set foreground and background
1266   dc.setForeground(foreWell->getRGBA());
1267   dc.setBackground(backWell->getRGBA());
1268 
1269   // Set stipple and fill
1270   dc.setStipple(stipple);
1271   dc.setFillStyle(fillStyle);
1272   dc.setTile(textureImage);
1273 
1274   // Set region for clip
1275   dc.setClipRegion(word_FOX);
1276 
1277   // Get region bounds
1278   FXRectangle rect=word_FOX.bounds();
1279 
1280   // Draw through region
1281   dc.fillRectangles(&rect,1);
1282 
1283   return 1;
1284   }
1285 
1286 
1287 // Repaint the images page
onPaintImages(FXObject * sender,FXSelector,void * ptr)1288 long DCTestWindow::onPaintImages(FXObject *sender,FXSelector,void *ptr){
1289   FXCanvas *canvas=(FXCanvas*)sender;
1290   FXEvent *ev=(FXEvent*)ptr;
1291   FXDCWindow dc(canvas,ev);
1292   dc.setForeground(eraseWell->getRGBA());
1293   dc.fillRectangle(0,0,canvas->getWidth(),canvas->getHeight());
1294   dc.drawImage(birdImage,0,0);
1295   return 1;
1296   }
1297 
1298 
1299 // This is the WYSIWYG routine, it takes a DC and renders
1300 // into it; it does not know if the DC is a printer or screen.
drawPage(FXDC & dc,FXint w,FXint h)1301 void DCTestWindow::drawPage(FXDC& dc,FXint w,FXint h){
1302 
1303   dc.setForeground(erasecolor);
1304   dc.fillRectangle(0,0,w,h);
1305 
1306   dc.setForeground(forecolor);
1307   dc.setBackground(backcolor);
1308 
1309   dc.setLineStyle(lineStyle);
1310   dc.setLineCap(capStyle);
1311   dc.setLineJoin(joinStyle);
1312   dc.setFunction(function);
1313 
1314   dc.setStipple(stipple);
1315   dc.setFillStyle(fillStyle);
1316   dc.setLineWidth(lineWidthSpinner->getValue());
1317   dc.setTile(textureImage);
1318 
1319   // Here's a single line
1320   dc.drawLine(20,200,w-20,200);
1321 
1322   // Here are some connected lines (to show join styles)
1323   FXPoint points[6];
1324   points[0].x=10;              points[0].y=3*h/4;
1325   points[1].x=points[0].x+w/6; points[1].y=h/2;
1326   points[2].x=points[1].x+w/6; points[2].y=points[0].y;
1327   points[3].x=points[2].x+w/6; points[3].y=points[1].y;
1328   points[4].x=points[3].x+w/6; points[4].y=points[0].y;
1329   points[5].x=points[4].x+w/6; points[5].y=points[1].y;
1330   dc.drawLines(points,6);
1331 
1332   FXString string="Font: "+testFont->getName()+"  Size: "+FXStringVal(testFont->getSize()/10);
1333   dc.setFont(testFont);
1334   dc.setForeground(forecolor);
1335   dc.setBackground(backcolor);
1336   dc.drawText(30,h-70,string.text(),string.length());
1337   dc.drawImageText(30,h-30,string.text(),string.length());
1338 
1339   dc.setFont(testFontAngle);
1340   dc.drawText(30,h-90,string.text(),string.length());
1341   dc.drawImageText(70,h-90,string.text(),string.length());
1342 
1343 
1344   dc.setForeground(forecolor);
1345   dc.setBackground(backcolor);
1346   dc.drawRectangle(20,20,200,100);
1347   dc.fillRectangle(300,20,200,100);
1348 
1349   dc.drawArc(20,120,100,100,64*ang1,64*ang2);
1350   dc.fillArc(200,120,100,100,64*ang1,64*ang2);
1351   dc.fillChord(400,120,100,100,64*ang1,64*ang2);
1352 
1353   dc.drawRoundRectangle(300,230,100,60, cornerw,cornerh);
1354 
1355   dc.fillRoundRectangle(420,230,100,60, cornerw,cornerh);
1356 
1357   FXPoint poly[5];
1358   poly[0].x=50;          poly[0].y=230;
1359   poly[1].x=poly[0].x+40; poly[1].y=poly[0].y+20;
1360   poly[2].x=poly[0].x+30; poly[2].y=poly[0].y+60;
1361   poly[3].x=poly[0].x-30; poly[3].y=poly[0].y+60;
1362   poly[4].x=poly[0].x-40; poly[4].y=poly[0].y+20;
1363   dc.fillPolygon(poly,5);
1364 
1365   poly[0].x=150;          poly[0].y=230;
1366   poly[1].x=poly[0].x+30; poly[1].y=poly[0].y+60;
1367   poly[2].x=poly[0].x-40; poly[2].y=poly[0].y+20;
1368   poly[3].x=poly[0].x+40; poly[3].y=poly[0].y+20;
1369   poly[4].x=poly[0].x-30; poly[4].y=poly[0].y+60;
1370   dc.fillComplexPolygon(poly,5);
1371 
1372   poly[0].x=250;          poly[0].y=230;
1373   poly[1].x=poly[0].x+30; poly[1].y=poly[0].y+60;
1374   poly[2].x=poly[0].x-40; poly[2].y=poly[0].y+20;
1375   poly[3].x=poly[0].x+40; poly[3].y=poly[0].y+20;
1376   poly[4].x=poly[0].x-30; poly[4].y=poly[0].y+60;
1377   dc.setFillRule(RULE_WINDING);
1378   dc.fillComplexPolygon(poly,5);
1379 
1380   FXPoint concave[4];
1381   concave[0].x=w-100; concave[0].y=h-100;
1382   concave[1].x=concave[0].x+40; concave[1].y=concave[0].y-20;
1383   concave[2].x=concave[0].x;    concave[2].y=concave[0].y+40;
1384   concave[3].x=concave[0].x-40; concave[3].y=concave[0].y-20;
1385   dc.fillConcavePolygon(concave,4);
1386 
1387   dc.drawEllipse(50,500,100,60);
1388   dc.fillEllipse(250,500,100,60);
1389 
1390   // Draw a pale blue dot :-)
1391   dc.setForeground(FXRGB(128,128,255));
1392   dc.drawPoint(w-20,h-20);
1393   }
1394 
1395 
1396 // Print the text
onCmdPrint(FXObject *,FXSelector,void *)1397 long DCTestWindow::onCmdPrint(FXObject*,FXSelector,void*){
1398   FXPrintDialog dlg(this,"Print Graphics");
1399   FXPrinter printer;
1400   if(dlg.execute()){
1401     dlg.getPrinter(printer);
1402     FXTRACE((100,"Printer = %s\n",printer.name.text()));
1403     FXDCPrint pdc(getApp());
1404     if(!pdc.beginPrint(printer)){
1405       FXMessageBox::error(this,MBOX_OK,"Printer Error","Unable to print");
1406       return 1;
1407       }
1408     pdc.beginPage(1);
1409     drawPage(pdc,500,500);
1410     pdc.endPage();
1411     pdc.endPrint();
1412     }
1413   return 1;
1414   }
1415 
1416 /*******************************************************************************/
1417 
1418 
1419 // Start the whole thing
main(int argc,char * argv[])1420 int main(int argc,char *argv[]){
1421 
1422   // Make application
1423   FXApp application("DCTest","FoxTest");
1424 
1425   // Open display
1426   application.init(argc,argv);
1427 
1428   // Make the main window
1429   new DCTestWindow(&application);
1430 
1431   // Create app
1432   application.create();
1433 
1434   // Go
1435   return application.run();
1436   }
1437 
1438 
1439