update dev300-m58
[ooovba.git] / hwpfilter / source / drawdef.h
blob5be6f3a022329279e7d85832199faeaa28aacb6d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: drawdef.h,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 /* NAME $Id: drawdef.h,v 1.5 2008-04-10 11:58:04 rt Exp $
33 * HISTORY
34 * frog - Jan 11, 1999: Created.
37 #ifndef _DRAWDEF_H_
38 #define _DRAWDEF_H_
40 #include "hwplib.h"
42 class HWPPara;
44 /**
45 * Constant for drawing objects
47 enum objtype
49 HWPDO_CONTAINER,
50 HWPDO_LINE,
51 HWPDO_RECT,
52 HWPDO_ELLIPSE,
53 HWPDO_ARC,
54 HWPDO_FREEFORM,
55 HWPDO_TEXTBOX,
56 HWPDO_CURVE,
57 HWPDO_ADVANCED_ELLIPSE,
58 HWPDO_ADVANCED_ARC,
59 HWPDO_CLOSED_FREEFORM,
60 HWPDO_NITEMS
63 #define HWPDO_PAT_TYPE_BITS 0xFF000000
64 #define HWPDO_PAT_STYLE_BITS 0x00FFFFFF
66 #define HWPDO_PAT_SOLID 0x00000000
67 #define HWPDO_PAT_WIN_HATCHED 0x01000000
68 #define HWPDO_PAT_BITMAP 0x02000000
70 #define HWPDO_COLOR_NONE 0x10000000
72 #define HWPDO_FLAG_ROUND_CORNER 0x00000001
73 #define HWPDO_FLAG_DRAW_PIE 0x00000002
74 #define HWPDO_FLAG_SEMICIRCLE 0x00000004
75 #define HWPDO_FLAG_SCALE_BITMAP 0x00000008
77 #define HWPDO_FLAG_LOCAL_BITS 0x0000ffff
78 #define HWPDO_FLAG_PROPERTY_BITS 0x00ff0000
80 #define HWPDO_FLAG_GRADATION 0x00010000
81 #define HWPDO_FLAG_ROTATION 0x00020000
82 #define HWPDO_FLAG_BITMAP 0x00040000
83 #define HWPDO_FLAG_AS_TEXTBOX 0x00080000
84 #define HWPDO_FLAG_WATERMARK 0x00100000
86 /**
87 * @short Basic properties for drawing objects
89 * The order of pstyle, hstyle and tstyle is important.
90 * @see LineObject
92 struct BAREHWPDOProperty
94 int line_pstyle;
95 int line_hstyle;
96 int line_tstyle;
97 DWORD line_color;
98 hunit line_width;
99 DWORD fill_color;
100 uint pattern_type;
101 DWORD pattern_color;
102 hunit hmargin;
103 hunit vmargin;
104 uint flag;
108 * @short Gradation properties for drawing object
110 struct GradationProperty
112 int fromcolor;
113 int tocolor;
114 int gstyle;
115 int angle;
116 int center_x;
117 int center_y;
118 int nstep;
122 * @short Bitmap properties for drawing object
124 struct BitmapProperty
126 ZZPoint offset1;
127 ZZPoint offset2;
128 char szPatternFile[260 + 1];
129 char pictype;
133 * @short Rotation properties for drawing object
135 struct RotationProperty
137 int rot_originx;
138 int rot_originy;
139 ZZParall parall;
143 * @short All properties for drawing object
145 struct HWPDOProperty
147 int line_pstyle; /* ¼± Áß°£ ¸ð¾ç */
148 int line_hstyle; /* ³¡ È­»ìÇ¥ ¸ð¾ç */
149 int line_tstyle; /* ½ÃÀÛ ¸ð¾ç */
150 DWORD line_color;
151 hunit line_width;
152 DWORD fill_color;
153 uint pattern_type;
154 DWORD pattern_color;
155 hunit hmargin;
156 hunit vmargin;
157 uint flag;
159 /* Lotation properties */
160 int rot_originx;
161 int rot_originy;
162 ZZParall parall;
164 /* Gradation properties */
166 int fromcolor;
167 int tocolor;
168 int gstyle;
169 int angle;
170 int center_x;
171 int center_y;
172 int nstep;
174 /* Watermark */
175 int luminance;
176 int contrast;
177 int greyscale;
179 /* As TextBox */
180 HWPPara *pPara;
183 ZZPoint offset1;
184 ZZPoint offset2;
185 char szPatternFile[MAX_PATH + 1];
186 char pictype;
190 * @short Line Object
192 struct HWPDOLine
194 uint flip;
198 * @short Polygon or Polyline Object
200 struct HWPDOFreeForm
202 int npt;
203 ZZPoint *pt;
207 * @short Textbox Object
209 struct HWPDOTextBox
211 HWPPara *h;
215 * @short Arc Object
217 struct HWPDOArc
219 ZZPoint radial[2];
223 * @short Common header for drawing object
225 struct HWPDrawingObject
228 * type of drawing object
230 int type;
232 * offset from origin of current group
234 ZZPoint offset;
236 * offset from origin of drawing object
238 ZZPoint offset2;
239 ZZSize extent;
241 * rectangle with consideration of line width
243 ZZRect vrect;
244 HWPDOProperty property;
245 union
247 HWPDOLine line_arc;
248 HWPDOFreeForm freeform;
249 HWPDOTextBox textbox;
251 * extended from hwpw96
253 HWPDOArc arc;
256 struct HWPDrawingObject *next;
258 * This exists for container object
260 struct HWPDrawingObject *child;
261 int index;
262 HWPDrawingObject();
263 ~HWPDrawingObject();
265 #endif /* _DRAWDEF_H_ */