fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / hwpfilter / source / drawdef.h
blobb80c18b82b62831c0fe08d255e07e41c42389a58
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_HWPFILTER_SOURCE_DRAWDEF_H
21 #define INCLUDED_HWPFILTER_SOURCE_DRAWDEF_H
23 #include "hwplib.h"
25 class HWPPara;
27 /**
28 * Constant for drawing objects
30 enum objtype
32 HWPDO_CONTAINER,
33 HWPDO_LINE,
34 HWPDO_RECT,
35 HWPDO_ELLIPSE,
36 HWPDO_ARC,
37 HWPDO_FREEFORM,
38 HWPDO_TEXTBOX,
39 HWPDO_CURVE,
40 HWPDO_ADVANCED_ELLIPSE,
41 HWPDO_ADVANCED_ARC,
42 HWPDO_CLOSED_FREEFORM,
43 HWPDO_NITEMS
46 #define HWPDO_PAT_TYPE_BITS 0xFF000000
48 #define HWPDO_PAT_SOLID 0x00000000
50 #define HWPDO_COLOR_NONE 0x10000000
52 #define HWPDO_FLAG_DRAW_PIE 0x00000002
55 #define HWPDO_FLAG_GRADATION 0x00010000
56 #define HWPDO_FLAG_ROTATION 0x00020000
57 #define HWPDO_FLAG_BITMAP 0x00040000
58 #define HWPDO_FLAG_AS_TEXTBOX 0x00080000
59 #define HWPDO_FLAG_WATERMARK 0x00100000
61 /**
62 * @short Basic properties for drawing objects
64 * The order of pstyle, hstyle and tstyle is important.
65 * @see LineObject
67 struct BAREHWPDOProperty
69 int line_pstyle;
70 int line_hstyle;
71 int line_tstyle;
72 unsigned int line_color;
73 hunit line_width;
74 unsigned int fill_color;
75 uint pattern_type;
76 unsigned int pattern_color;
77 hunit hmargin;
78 hunit vmargin;
79 uint flag;
82 /**
83 * @short Gradation properties for drawing object
85 struct GradationProperty
87 int fromcolor;
88 int tocolor;
89 int gstyle;
90 int angle;
91 int center_x;
92 int center_y;
93 int nstep;
96 /**
97 * @short Bitmap properties for drawing object
99 struct BitmapProperty
101 ZZPoint offset1;
102 ZZPoint offset2;
103 char szPatternFile[260 + 1];
104 char pictype;
108 * @short Rotation properties for drawing object
110 struct RotationProperty
112 int rot_originx;
113 int rot_originy;
114 ZZParall parall;
118 * @short All properties for drawing object
120 struct HWPDOProperty
122 int line_pstyle; /* 선 중간 모양 */
123 int line_hstyle; /* 끝 화살표 모양 */
124 int line_tstyle; /* 시작 모양 */
125 unsigned int line_color;
126 hunit line_width;
127 unsigned int fill_color;
128 uint pattern_type;
129 unsigned int pattern_color;
130 hunit hmargin;
131 hunit vmargin;
132 uint flag;
134 /* Lotation properties */
135 int rot_originx;
136 int rot_originy;
137 ZZParall parall;
139 /* Gradation properties */
141 int fromcolor;
142 int tocolor;
143 int gstyle;
144 int angle;
145 int center_x;
146 int center_y;
147 int nstep;
149 /* Watermark */
150 int luminance;
151 int contrast;
152 int greyscale;
154 /* As TextBox */
155 HWPPara *pPara;
158 ZZPoint offset1;
159 ZZPoint offset2;
160 char szPatternFile[260 + 1];
161 char pictype;
165 * @short Line Object
167 struct HWPDOLine
169 uint flip;
173 * @short Polygon or Polyline Object
175 struct HWPDOFreeForm
177 int npt;
178 ZZPoint *pt;
182 * @short Textbox Object
184 struct HWPDOTextBox
186 HWPPara *h;
190 * @short Arc Object
192 struct HWPDOArc
194 ZZPoint radial[2];
198 * @short Common header for drawing object
200 struct HWPDrawingObject
203 * type of drawing object
205 int type;
207 * offset from origin of current group
209 ZZPoint offset;
211 * offset from origin of drawing object
213 ZZPoint offset2;
214 ZZSize extent;
216 * rectangle with consideration of line width
218 ZZRect vrect;
219 HWPDOProperty property;
220 union
222 HWPDOLine line_arc;
223 HWPDOFreeForm freeform;
224 HWPDOTextBox textbox;
226 * extended from hwpw96
228 HWPDOArc arc;
231 struct HWPDrawingObject *next;
233 * This exists for container object
235 struct HWPDrawingObject *child;
236 int index;
237 HWPDrawingObject();
238 ~HWPDrawingObject();
240 #endif // INCLUDED_HWPFILTER_SOURCE_DRAWDEF_H
242 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */