1 /*
2   Copyright 2011 Inge Wallin <inge@lysator.liu.se>
3 
4   This library is free software; you can redistribute it and/or
5   modify it under the terms of the GNU Lesser General Public
6   License as published by the Free Software Foundation; either
7   version 2.1 of the License, or (at your option) any later version.
8 
9   This library is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12   Lesser General Public License for more details.
13 
14   You should have received a copy of the GNU Lesser General Public
15   License along with this library.  If not, see <http://www.gnu.org/licenses/>.
16 */
17 
18 #ifndef SVMENUMS_H
19 #define SVMENUMS_H
20 
21 
22 /**
23    \file
24 
25    Enumerations used in various parts of SVM files
26 */
27 
28 /**
29    Namespace for StarView Metafile (SVM) classes
30 */
31 namespace Libsvm
32 {
33 
34     /**
35        Action types
36 
37        See the SPEC Section 2.1.1.1
38     */
39     enum ActionType {
40         META_NULL_ACTION                  = 0,
41         META_PIXEL_ACTION                 = 100,
42         META_POINT_ACTION                 = 101,
43         META_LINE_ACTION                  = 102,
44         META_RECT_ACTION                  = 103,
45         META_ROUNDRECT_ACTION             = 104,
46         META_ELLIPSE_ACTION               = 105,
47         META_ARC_ACTION                   = 106,
48         META_PIE_ACTION                   = 107,
49         META_CHORD_ACTION                 = 108,
50         META_POLYLINE_ACTION              = 109,
51         META_POLYGON_ACTION               = 110,
52         META_POLYPOLYGON_ACTION           = 111,
53         META_TEXT_ACTION                  = 112,
54         META_TEXTARRAY_ACTION             = 113,
55         META_STRETCHTEXT_ACTION           = 114,
56         META_TEXTRECT_ACTION              = 115,
57         META_BMP_ACTION                   = 116,
58         META_BMPSCALE_ACTION              = 117,
59         META_BMPSCALEPART_ACTION          = 118,
60         META_BMPEX_ACTION                 = 119,
61         META_BMPEXSCALE_ACTION            = 120,
62         META_BMPEXSCALEPART_ACTION        = 121,
63         META_MASK_ACTION                  = 122,
64         META_MASKSCALE_ACTION             = 123,
65         META_MASKSCALEPART_ACTION         = 124,
66         META_GRADIENT_ACTION              = 125,
67         META_HATCH_ACTION                 = 126,
68         META_WALLPAPER_ACTION             = 127,
69         META_CLIPREGION_ACTION            = 128,
70         META_ISECTRECTCLIPREGION_ACTION   = 129,
71         META_ISECTREGIONCLIPREGION_ACTION = 130,
72         META_MOVECLIPREGION_ACTION        = 131,
73         META_LINECOLOR_ACTION             = 132,
74         META_FILLCOLOR_ACTION             = 133,
75         META_TEXTCOLOR_ACTION             = 134,
76         META_TEXTFILLCOLOR_ACTION         = 135,
77         META_TEXTALIGN_ACTION             = 136,
78         META_MAPMODE_ACTION               = 137,
79         META_FONT_ACTION                  = 138,
80         META_PUSH_ACTION                  = 139,
81         META_POP_ACTION                   = 140,
82         META_RASTEROP_ACTION              = 141,
83         META_TRANSPARENT_ACTION           = 142,
84         META_EPS_ACTION                   = 143,
85         META_REFPOINT_ACTION              = 144,
86         META_TEXTLINECOLOR_ACTION         = 145,
87         META_TEXTLINE_ACTION              = 146,
88         META_FLOATTRANSPARENT_ACTION      = 147,
89         META_GRADIENTEX_ACTION            = 148,
90         META_LAYOUTMODE_ACTION            = 149,
91         META_TEXTLANGUAGE_ACTION          = 150,
92         META_OVERLINECOLOR_ACTION         = 151,
93         META_RENDERGRAPHIC_ACTION         = 152,
94         META_COMMENT_ACTION               = 512
95     };
96 
97 #define META_LAST_ACTION  META_RENDERGRAPHIC_ACTION
98 
99     /**
100         Text align
101 
102 
103         FIXME: Define this in the spec
104     */
105 
106     enum TextAlign {
107         ALIGN_TOP,
108         ALIGN_BASELINE,
109         ALIGN_BOTTOM
110     };
111 
112     /**
113        Mtf (FIXME)
114 
115        See the SPEC Section 2.1.1.2
116     */
117     enum MtfType {
118         MTF_CONVERSION_NONE           = 0,
119         MTF_CONVERSION_1BIT_THRESHOLD = 1,
120         MTF_CONVERSION_8BIT_GREYS     = 2
121     };
122 
123 
124     /**
125        Layout Mode
126 
127        See the SPEC, Section 2.2.2.4
128     */
129     enum LayoutMode {
130         TEXT_LAYOUT_DEFAULT           = 0x0000,
131         TEXT_LAYOUT_BIDI_LTR          = 0x0000,
132         TEXT_LAYOUT_BIDI_RTL          = 0x0001,
133         TEXT_LAYOUT_BIDI_STRONG       = 0x0002,
134         TEXT_LAYOUT_TEXTORIGIN_LEFT   = 0x0004,
135         TEXT_LAYOUT_TEXTORIGIN_RIGHT  = 0x0008,
136         TEXT_LAYOUT_COMPLEX_DISABLED  = 0x0100,
137         TEXT_LAYOUT_ENABLE_LIGATURES  = 0x0200,
138         TEXT_LAYOUT_SUBSTITUTE_DIGITS = 0x0400
139     };
140 
141 
142     // ----------------------------------------------------------------
143     //                             Flags
144     // ----------------------------------------------------------------
145 
146 
147     /**
148        Mirror flags
149 
150        See the SPEC Section 2.1.2.1
151     */
152     enum MtfMirrorType {
153         MTF_MIRROR_NONE = 0x00000000,
154         MTF_MIRROR_HORZ = 0x00000001,
155         MTF_MIRROR_VERT = 0x00000002
156     };
157 
158 }
159 
160 
161 #endif
162