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