Bump for 3.6-28
[LibreOffice.git] / hwpfilter / source / drawdef.h
blob5c0423c1f6e680217fda593ae645c63f7424a186
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _DRAWDEF_H_
30 #define _DRAWDEF_H_
32 #include "hwplib.h"
34 class HWPPara;
36 /**
37 * Constant for drawing objects
39 enum objtype
41 HWPDO_CONTAINER,
42 HWPDO_LINE,
43 HWPDO_RECT,
44 HWPDO_ELLIPSE,
45 HWPDO_ARC,
46 HWPDO_FREEFORM,
47 HWPDO_TEXTBOX,
48 HWPDO_CURVE,
49 HWPDO_ADVANCED_ELLIPSE,
50 HWPDO_ADVANCED_ARC,
51 HWPDO_CLOSED_FREEFORM,
52 HWPDO_NITEMS
55 #define HWPDO_PAT_TYPE_BITS 0xFF000000
56 #define HWPDO_PAT_STYLE_BITS 0x00FFFFFF
58 #define HWPDO_PAT_SOLID 0x00000000
59 #define HWPDO_PAT_WIN_HATCHED 0x01000000
60 #define HWPDO_PAT_BITMAP 0x02000000
62 #define HWPDO_COLOR_NONE 0x10000000
64 #define HWPDO_FLAG_ROUND_CORNER 0x00000001
65 #define HWPDO_FLAG_DRAW_PIE 0x00000002
66 #define HWPDO_FLAG_SEMICIRCLE 0x00000004
67 #define HWPDO_FLAG_SCALE_BITMAP 0x00000008
69 #define HWPDO_FLAG_LOCAL_BITS 0x0000ffff
70 #define HWPDO_FLAG_PROPERTY_BITS 0x00ff0000
72 #define HWPDO_FLAG_GRADATION 0x00010000
73 #define HWPDO_FLAG_ROTATION 0x00020000
74 #define HWPDO_FLAG_BITMAP 0x00040000
75 #define HWPDO_FLAG_AS_TEXTBOX 0x00080000
76 #define HWPDO_FLAG_WATERMARK 0x00100000
78 /**
79 * @short Basic properties for drawing objects
81 * The order of pstyle, hstyle and tstyle is important.
82 * @see LineObject
84 struct BAREHWPDOProperty
86 int line_pstyle;
87 int line_hstyle;
88 int line_tstyle;
89 DWORD line_color;
90 hunit line_width;
91 DWORD fill_color;
92 uint pattern_type;
93 DWORD pattern_color;
94 hunit hmargin;
95 hunit vmargin;
96 uint flag;
99 /**
100 * @short Gradation properties for drawing object
102 struct GradationProperty
104 int fromcolor;
105 int tocolor;
106 int gstyle;
107 int angle;
108 int center_x;
109 int center_y;
110 int nstep;
114 * @short Bitmap properties for drawing object
116 struct BitmapProperty
118 ZZPoint offset1;
119 ZZPoint offset2;
120 char szPatternFile[260 + 1];
121 char pictype;
125 * @short Rotation properties for drawing object
127 struct RotationProperty
129 int rot_originx;
130 int rot_originy;
131 ZZParall parall;
135 * @short All properties for drawing object
137 struct HWPDOProperty
139 int line_pstyle; /* ¼± Áß°£ ¸ð¾ç */
140 int line_hstyle; /* ³¡ È­»ìÇ¥ ¸ð¾ç */
141 int line_tstyle; /* ½ÃÀÛ ¸ð¾ç */
142 DWORD line_color;
143 hunit line_width;
144 DWORD fill_color;
145 uint pattern_type;
146 DWORD pattern_color;
147 hunit hmargin;
148 hunit vmargin;
149 uint flag;
151 /* Lotation properties */
152 int rot_originx;
153 int rot_originy;
154 ZZParall parall;
156 /* Gradation properties */
158 int fromcolor;
159 int tocolor;
160 int gstyle;
161 int angle;
162 int center_x;
163 int center_y;
164 int nstep;
166 /* Watermark */
167 int luminance;
168 int contrast;
169 int greyscale;
171 /* As TextBox */
172 HWPPara *pPara;
175 ZZPoint offset1;
176 ZZPoint offset2;
177 char szPatternFile[260 + 1];
178 char pictype;
182 * @short Line Object
184 struct HWPDOLine
186 uint flip;
190 * @short Polygon or Polyline Object
192 struct HWPDOFreeForm
194 int npt;
195 ZZPoint *pt;
199 * @short Textbox Object
201 struct HWPDOTextBox
203 HWPPara *h;
207 * @short Arc Object
209 struct HWPDOArc
211 ZZPoint radial[2];
215 * @short Common header for drawing object
217 struct HWPDrawingObject
220 * type of drawing object
222 int type;
224 * offset from origin of current group
226 ZZPoint offset;
228 * offset from origin of drawing object
230 ZZPoint offset2;
231 ZZSize extent;
233 * rectangle with consideration of line width
235 ZZRect vrect;
236 HWPDOProperty property;
237 union
239 HWPDOLine line_arc;
240 HWPDOFreeForm freeform;
241 HWPDOTextBox textbox;
243 * extended from hwpw96
245 HWPDOArc arc;
248 struct HWPDrawingObject *next;
250 * This exists for container object
252 struct HWPDrawingObject *child;
253 int index;
254 HWPDrawingObject();
255 ~HWPDrawingObject();
257 #endif /* _DRAWDEF_H_ */
259 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */