xref: /AOO41X/main/filter/source/graphicfilter/icgm/cgmtypes.hxx (revision 22e87013b212da8c80c93e291ad90de8f36964c2)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef CGM_TYPES_HXX_
25 #define CGM_TYPES_HXX_
26 
27 struct FloatPoint
28 {
29         double          X;
30         double          Y;
FloatPointFloatPoint31         FloatPoint(){};
FloatPointFloatPoint32         FloatPoint( const double& rX, const double& rY ) { X = rX, Y = rY; };
33 };
34 
35 struct FloatRect
36 {
37         double          Left;
38         double          Top;
39         double          Right;
40         double          Bottom;
FloatRectFloatRect41         FloatRect(){};
FloatRectFloatRect42         FloatRect( const FloatPoint& rTopLeft, const FloatPoint& rBottomRight )
43         {
44             Left = rTopLeft.X;
45             Top = rTopLeft.Y;
46             Right = rBottomRight.X;
47             Bottom = rBottomRight.Y;
48         }
JustifyFloatRect49         void Justify()
50         {
51             double fTemp;
52             if ( Left > Right )
53             {
54                 fTemp = Left;
55                 Left = Right;
56                 Right = fTemp;
57             }
58             if ( Top > Bottom )
59             {
60                 fTemp = Top;
61                 Top = Bottom;
62                 Bottom = fTemp;
63             }
64         }
65 };
66 
67 struct HatchEntry
68 {
69     int     HatchStyle;
70     long    HatchDistance;
71     long    HatchAngle;
72 };
73 
74 #define ASF_LINETYPE            0x00000001UL
75 #define ASF_LINEWIDTH           0x00000002UL
76 #define ASF_LINECOLOR           0x00000004UL
77 #define ASF_MARKERTYPE          0x00000008UL
78 #define ASF_MARKERSIZE          0x00000010UL
79 #define ASF_MARKERCOLOR         0x00000020UL    // NS
80 #define ASF_FILLINTERIORSTYLE   0x00000040UL
81 #define ASF_HATCHINDEX          0x00000080UL
82 #define ASF_PATTERNINDEX        0x00000100UL
83 #define ASF_BITMAPINDEX         0x00000200UL    // NS
84 #define ASF_FILLCOLOR           0x00000400UL
85 #define ASF_EDGETYPE            0x00000800UL
86 #define ASF_EDGEWIDTH           0x00001000UL
87 #define ASF_EDGECOLOR           0x00002000UL
88 #define ASF_TEXTFONTINDEX       0x00004000UL
89 #define ASF_TEXTPRECISION       0x00008000UL
90 #define ASF_CHARACTEREXPANSION  0x00010000UL
91 #define ASF_CHARACTERSPACING    0x00020000UL
92 #define ASF_TEXTCOLOR           0x00040000UL
93 
94 #define ACT4_GRADIENT_ACTION    0x00000001UL
95 
96 enum RealPrecision      { RP_FLOAT = 0, RP_FIXED = 1 };
97 
98 enum ScalingMode        { SM_ABSTRACT = 0, SM_METRIC = 1 };
99 
100 enum VDCType            { VDC_INTEGER = 0, VDC_REAL = 1 };
101 enum DeviceViewPortMode { DVPM_FRACTION = 0, DVPM_METRIC = 1, DVPM_DEVICE = 2 };
102 enum DeviceViewPortMap  { DVPM_NOT_FORCED = 0, DVPM_FORCED = 1 };
103 enum DeviceViewPortMapH { DVPMH_LEFT = 0, DVPMH_CENTER = 1, CVPMH_RIGHT = 2 };
104 enum DeviceViewPortMapV { DVPMV_BOTTOM = 0, DVPMV_CENTER = 1, DVPMV_TOP = 2 };
105 
106 enum ClipIndicator      { CI_OFF = 0, CI_ON = 1 };
107 
108 enum ColorSelectionMode { CSM_INDEXED = 0, CSM_DIRECT = 1 };
109 enum ColorModel         { CM_RGB = 0, CM_CYMK = 1 };
110 
111 enum CharacterCodingA   { CCA_BASIC_7 = 0, CCA_BASIC_8 = 1, CCA_EXT_7 = 2, CCA_EXT_8 = 3 };
112 enum CharSetType        { CST_CBYTE_94 = 0, CST_CBYTE_96 = 1, CST_MULT94 = 2, CST_MULT96 = 3, CST_CCOMPLETE = 4 };
113 enum TextPrecision      { TPR_STRING = 0, TPR_CHARACTER = 1, TPR_STROKE = 2, TPR_UNDEFINED = 0xffff };
114 enum TextPath           { TPR_RIGHT = 0, TPR_LEFT = 1, TPR_UP = 2, TPR_DOWN = 3 };
115 enum TextAlignmentH     { TAH_NORMAL = 0, TAH_LEFT = 1, TAH_CENTER = 2, TAH_RIGHT = 3, TAH_CONT = 4 };
116 enum TextAlignmentV     { TAV_NORMAL = 0, TAV_TOP = 1, TAV_CAP = 2, TAV_HALF = 3, TAV_BASE = 4, TAV_BOTTOM = 5, TAV_CONT = 6 };
117 enum UnderlineMode      { UM_OFF = 0, UM_LOW = 1, UM_HIGH = 2, UM_STRIKEOUT = 4, UM_OVERSCORE = 8 };
118 enum FinalFlag          { FF_NOT_FINAL = 0, FF_FINAL = 1 };
119 
120 enum LineType           { LT_SOLID = 1, LT_DASH = 2, LT_DOT = 3, LT_DASHDOT = 4, LT_DASHDOTDOT = 5,     // Standart
121                             LT_NONE = -4, LT_DOTDOTSPACE = -3, LT_LONGDASH = -2, LT_DASHDASHDOT = -1 }; // GDSF Styles
122 enum SpecMode           { SM_ABSOLUTE = 0, SM_SCALED = 1 };
123 enum LineCapType        { LCT_BUTT = 0, LCT_ROUND = 1, LCT_SQUARE = 2, LCT_TRIANGLE = 3, LCT_ARROW = 4, LCT_NONE = -1 };
124 enum LineJoinType       { LJT_MITER = 0, LJT_ROUND = 1, LJT_BEVEL = 2, LJT_NONE = -1 };
125 
126 
127 enum EdgeType           { ET_SOLID = 1, ET_DASH = 2, ET_DOT = 3, ET_DASHDOT = 4, ET_DASHDOTDOT = 5,     // Standart
128                             ET_NONE = -4, ET_DOTDOTSPACE = -3, ET_LONGDASH = -2, ET_DASHDASHDOT = -1 }; // GDSF Styles
129 enum EdgeVisibility     { EV_OFF = 0, EV_ON = 1 };
130 
131 enum MarkerType         { MT_POINT = 1, MT_PLUS = 2, MT_STAR = 3, MT_CIRCLE = 4, MT_CROSS = 5 };
132 
133 enum Transparency       { T_OFF = 0, T_ON = 1 };
134 
135 enum FillInteriorStyle  { FIS_HOLLOW = 0, FIS_SOLID = 1, FIS_PATTERN = 2, FIS_HATCH = 3, FIS_EMPTY = 4, FIS_GEOPATTERN = 5,
136                             FIS_INTERPOLATED = 6, FIS_GRADIENT = 7 };
137 
138 
139 
140 
141 #endif
142