summaryrefslogtreecommitdiff
path: root/support/dktools/wxdenum.ctr
blob: fb27c5ca94069d7d90c51d6a9e7d189e90c7cdbc (plain)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
%%	options

copyright owner	=	Dirk Krause
copyright year	=	2018-xxxx
SPDX-License-Identifier:	BSD-3-Clause

%%	header

/**	@file	wxdenum.h	Enumerations for wxdkraw and wxd2lat.
*/


#ifndef	DK4TYPES_H_INCLUDED
#include "dk4types.h"
#endif

#ifndef	DK4GRA_H_INCLUDED
#include "dk4gra.h"
#endif


/**	Line buffer length.
*/
enum {
	/**	Line buffer length.
	*/
	WXD_LINE_LENGTH	=	1024
};



/**	Line cap, cs component of wxd_style_closed_t.
*/
enum {
					/**	Butted end: cutted at specified point.
					*/
	WXD_LC_BUTTED	=	DK4_GRA_LC_BUTTED ,

					/**	Rounded end: half circle added.
					*/
	WXD_LC_ROUNDED	=	DK4_GRA_LC_ROUNDED ,

					/**	Projecting end: half square added.
					*/
	WXD_LC_PROJECTING =	DK4_GRA_LC_PROJECTING
};



/**	Line join, js component of wxd_object_t.
*/
enum {
					/**	Mitered line join: Outer borders meed in an arrow.
					*/
	WXD_LJ_MITERED	=	DK4_GRA_LJ_MITERED ,

					/**	Rounded line joing.
					*/
	WXD_LJ_ROUNDED	=	DK4_GRA_LJ_ROUNDED ,

					/**	Beveled line join: Arrow from outer borders cutted.
					*/
	WXD_LJ_BEVELED	=	DK4_GRA_LJ_BEVELED
};



/**	Line styles, ls component of wxd_object_t.
*/
enum {
							/**	Draw solid line.
							*/
	WXD_LS_SOLID			=	DK4_GRA_LS_SOLID ,

							/**	Dashed line.
						 	*/
    WXD_LS_DASH				=	DK4_GRA_LS_DASH ,

							/**	Dotted line.
							*/
    WXD_LS_DOT				=	DK4_GRA_LS_DOT ,

							/**	Dash dot line.
							*/
    WXD_LS_DASH_DOT			=	DK4_GRA_LS_DASH_DOT ,

							/**	Dash dot dot line.
							*/
    WXD_LS_DASH_DOT_DOT		=	DK4_GRA_LS_DASH_DOT_DOT ,

							/**	Dash dot dot dot line.
							*/
    WXD_LS_DASH_DOT_DOT_DOT	=	DK4_GRA_LS_DASH_DOT_DOT_DOT
};



enum {
	WXD_COLOR_NONE			= 0 ,
	WXD_COLOR_BLACK ,
	WXD_COLOR_BLUE ,
	WXD_COLOR_GREEN ,
	WXD_COLOR_CYAN ,
	WXD_COLOR_RED ,
	WXD_COLOR_MAGENTA ,
	WXD_COLOR_YELLOW ,
	WXD_COLOR_WHITE ,
	WXD_COLOR_VERY_DARK_BLUE ,
	WXD_COLOR_DARK_BLUE ,
	WXD_COLOR_LIGHT_BLUE ,
	WXD_COLOR_VERY_LIGHT_BLUE ,
	WXD_COLOR_DARK_GREEN ,
	WXD_COLOR_LIGHT_GREEN ,
	WXD_COLOR_VERY_LIGHT_GREEN ,
	WXD_COLOR_DARK_CYAN ,
	WXD_COLOR_LIGHT_CYAN ,
	WXD_COLOR_VERY_LIGHT_CYAN ,
	WXD_COLOR_DARK_RED ,
	WXD_COLOR_LIGHT_RED ,
	WXD_COLOR_VERY_LIGHT_RED ,
	WXD_COLOR_DARK_MAGENTA ,
	WXD_COLOR_LIGHT_MAGENTA ,
	WXD_COLOR_VERY_LIGHT_MAGENTA ,
	WXD_COLOR_DARK_BROWN ,
	WXD_COLOR_BROWN ,
	WXD_COLOR_LIGHT_BROWN ,
	WXD_COLOR_VERY_DARK_PINK ,
	WXD_COLOR_DARK_PINK ,
	WXD_COLOR_LIGHT_PINK ,
	WXD_COLOR_VERY_LIGHT_PINK ,
	WXD_COLOR_GOLD
};


/**	Fill styles and patterns, fs component of wxd_style_open_t.
	From the wxd pattern fill style substract 2 to obtain
	the dk4gra pattern fill style.
*/
enum {
	/**	Do not fill object.
	*/
	WXD_FS_NONE				= 0 ,

	/**	Fill object with pure fill color.
	*/
	WXD_FS_PURE				= 1 ,

	/**	Diagonal lines 30 degrees to the left.
	*/
	WXD_FS_30_DEGREE_LEFT				=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_30_DEGREE_LEFT) ,

	/**	Diagonal lines 30 degrees to the right.
	*/
	WXD_FS_30_DEGREE_RIGHT				=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_30_DEGREE_RIGHT) ,

	/**	Crosshatch of lines 30 degrees to the left and right.
	*/
	WXD_FS_30_DEGREE_SIEVE				=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_30_DEGREE_SIEVE) ,

	/**	Diagonal lines 45 degrees to the left.
	*/
	WXD_FS_45_DEGREE_LEFT				=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_45_DEGREE_LEFT) ,

	/**	Diagonal lines 45 degrees to the left.
	*/
	WXD_FS_45_DEGREE_RIGHT				=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_45_DEGREE_RIGHT) ,

	/**	Crosshatch of lines 45 degrees to the left and right.
	*/
	WXD_FS_45_DEGREE_SIEVE				=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_45_DEGREE_SIEVE) ,

	/**	Horizontal bricks.
	*/
	WXD_FS_HORIZONTAL_BRICKS			=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_HORIZONTAL_BRICKS) ,

	/**	Vertical bricks.
	*/
	WXD_FS_VERTICAL_BRICKS				=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_VERTICAL_BRICKS) ,

	/**	Horizontal lines.
	*/
	WXD_FS_HORIZONTAL_LINES				=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_HORIZONTAL_LINES) ,

	/**	Vertical lines.
	*/
	WXD_FS_VERTICAL_LINES				=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_VERTICAL_LINES) ,

	/**	Crosshatch of horizontal and vertical lines.
	*/
	WXD_FS_HORIZONTAL_VERTICAL_SIEVE	=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_HORIZONTAL_VERTICAL_SIEVE) ,

	/**	Horizontal shingles skewed to the left.
	*/
	WXD_FS_HORIZONTAL_SHINGLES_LEFT		=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_HORIZONTAL_SHINGLES_LEFT) ,

	/**	Horizontal shingles skewed to the right.
	*/
	WXD_FS_HORIZONTAL_SHINGLES_RIGHT	=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_HORIZONTAL_SHINGLES_RIGHT) ,

	/**	Vertical shingles skewed to one side.
	*/
	WXD_FS_VERTICAL_SHINGLES_1			=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_VERTICAL_SHINGLES_1) ,

	/**	Vertical shingles skewed to the other side.
	*/
	WXD_FS_VERTICAL_SHINGLES_2			=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_VERTICAL_SHINGLES_2) ,

	/**	Large fish scales.
	*/
	WXD_FS_LARGE_FISH_SCALES			=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_LARGE_FISH_SCALES) ,

	/**	Small fish scales.
	*/
	WXD_FS_SMALL_FISH_SCALES			=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_SMALL_FISH_SCALES) ,

	/**	Circles.
	*/
	WXD_FS_CIRCLES						=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_CIRCLES) ,

	/**	Hexagons.
	*/
	WXD_FS_HEXAGONS						=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_HEXAGONS) ,

	/**	Octagons.
	*/
	WXD_FS_OCTAGONS						=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_OCTAGONS) ,

	/**	Horizontal tire treads.
	*/
	WXD_FS_HORIZONTAL_TIRES				=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_HORIZONTAL_TIRES) ,

	/**	Vertical tire treads.
	*/
	WXD_FS_VERTICAL_TIRES				=
			(WXD_FS_PURE + 1 + DK4_GRA_PATTERN_VERTICAL_TIRES)

};


/**	Image flags.
*/
enum {
	WXD_IMFL_ASPECT		=	0x01,	/**< Keep aspect ratio. */
	WXD_IMFL_USE_ALPHA	=	0x02,	/**< Use alpha channel for mixing. */
	WXD_IMFL_IMG_INT	=	0x04,	/**< Image interpolation. */
	WXD_IMFL_USE_DCT	=	0x08,	/**< Direct re-use of DCT data. */
	WXD_IMFL_DCT_INT	=	0x10,	/**< Image interpolation for DCT data. */
	WXD_IMFL_FORCE_BG	=	0x20,	/**< Force background from WXD file. */
};


/**	Horizontal text alignment, al component of wxd_det_text_t.
*/
enum {
					/**	Left aligned.
					*/
	WXD_TA_LEFT		=	DK4_TEXT_ALIGN_H_LEFT ,

					/**	Centered text.
					*/
	WXD_TA_CENTERED	=	DK4_TEXT_ALIGN_H_CENTERED ,

					/**	Right aligned.
					*/
	WXD_TA_RIGHT	=	DK4_TEXT_ALIGN_H_RIGHT
};



/**	Object types, ot component of wxd_object_t.
*/
enum {
						/**	End of group (only in file).
						*/
	WXD_OT_GROUP_END	= -1 ,

						/**	Configuration line (only in file).
						*/
	WXD_OT_CONFIG		=  0 ,

						/**	Group (in memory), begin of group (in file).
						*/
	WXD_OT_GROUP_BEGIN	=  1 ,

						/**	Text label.
						*/
	WXD_OT_TEXT			=  2 ,

						/**	Polyline.
						*/
	WXD_OT_POLYLINE		=  3 ,

						/**	Open X-spline.
						*/
	WXD_OT_O_SPLINE		=  4 ,

						/**	Open arc.
						*/
	WXD_OT_O_ARC		=  5 ,

						/**	Polygon (closed polyline).
						*/
	WXD_OT_POLYGON		=  6 ,

						/**	Closed X-spline.
						*/
	WXD_OT_C_SPLINE		=  7 ,

						/**	Closed arc.
						*/
	WXD_OT_C_ARC		=  8 ,

						/**	Circle.
						*/
	WXD_OT_CIRCLE		=  9 ,

						/**	Ellipse.
						*/
	WXD_OT_ELLIPSE		= 10 ,

						/**	Rectangular box, optionally with rounded corners.
						*/
	WXD_OT_BOX			= 11 ,

						/**	Embedded image.
						*/
	WXD_OT_IMAGE		= 12 ,

						/**	Dot, filled with colour.
						*/
	WXD_OT_DOT_FILLED	= 13 ,

						/**	White filled dot.
						*/
	WXD_OT_DOT_WHITE	= 14
};



/**	Object classes.
*/
enum {
	WXD_OC_CONTROL		=	0 ,	/**< Control elements (group, config). */
	WXD_OC_CLOSED ,				/**< Closed objects (fill and stroke). */
	WXD_OC_OPEN ,				/**< Open objects (stroke only). */
	WXD_OC_TEXT , 				/**< Text. */
	WXD_OC_IMAGE				/**< Embedded image. */
};


/**	Grid unit.
*/
enum {
	WXD_UNIT_INCH	=	0 ,		/**< Centimeter based grid. */
	WXD_UNIT_CM					/**< Inch based grid. */
};


/**	How many snap grid steps per optical grid step.
*/
enum {
					/**	Use powers of 2.
						At zoom factor 0 use 4 steps per centimeter,
						8 steps per inch.
					*/
	WXD_GRIDBASE_2	=	0 ,

					/**	Multiples of 10.
						At zoom factor 0 use 5 steps per centimeter,
						10 steps per inch.
					*/
	WXD_GRIDBASE_10
};



/**	Which caches need a refresh.
*/
enum {
	WXD_REFRESH_NONE = 0 ,	/**< No rebuilt necessary, all caches up to date. */
	WXD_REFRESH_MARKUP ,	/**< Markup needs refresh. */
	WXD_REFRESH_DRAWING ,	/**< Drawing and markup need refresh. */
	WXD_REFRESH_GRID		/**< Refresh everything. */
};



/**	Markup to apply to an object.
*/
enum {
	WXD_MARKUP_NONE	= 0 ,	/**< No markup, normal object. */
	WXD_MARKUP_COPY ,		/**< Candidate for copy operation. */
	WXD_MARKUP_MOVE ,		/**< Candidate for move or selection change. */
	WXD_MARKUP_DELETE ,		/**< Candidate for deletion. */
	WXD_MARKUP_GROUP ,		/**< Candidate for grouping or style change. */
	WXD_MARKUP_PTMOVE ,		/**< Candidate for moving a point. */
	WXD_MARKUP_IMGRES ,		/**< Image resize. */
};



/* vim: set ai sw=4 ts=4 : */