root/trunk/cairo/cairooo/enums.d

Revision 119, 6.3 kB (checked in by DRK, 6 years ago)

* Added bindings for the Glitz and Xlib backends.
* Checked in cairooo: an OO layer on top of the cairo binding.
* Added snippets directory for cairooo
* Added basic tutorial on how to use cairooo
* Added a simple demo program.
* Added scripts for building import libraries.
* Fixed several bugs.
* Drank WAAY too much coffee.

Line 
1 /**
2     This module contains various enumerations used throughout the cairooo
3     library.
4     
5 Authors: Daniel Keep
6 Copyright: 2006, Daniel Keep
7 License: BSD v2 (http://opensource.org/licenses/bsd-license.php).
8 **/
9 /**
10     Copyright © 2006 Daniel Keep
11     All rights reserved.
12     
13     Redistribution and use in source and binary forms, with or without
14     modification, are permitted provided that the following conditions are
15     met:
16     
17     * Redistributions of source code must retain the above copyright
18       notice, this list of conditions and the following disclaimer.
19       
20     * Redistributions in binary form must reproduce the above copyright
21       notice, this list of conditions and the following disclaimer in the
22       documentation and/or other materials provided with the distribution.
23     
24     * Neither the name of this software, nor the names of its contributors
25       may be used to endorse or promote products derived from this software
26       without specific prior written permission.
27     
28     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29     "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
30     TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31     PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
32     CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
33     EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
34     PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
35     PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
36     LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
37     NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
38     SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 **/
40 module cairooo.enums;
41
42 private
43 {
44     import cairo.cairo;
45 }
46
47 ///
48 enum Antialias : int
49 {
50     ///
51     Default = cairo_antialias_t.CAIRO_ANTIALIAS_DEFAULT,
52     ///
53     None = cairo_antialias_t.CAIRO_ANTIALIAS_NONE,
54     ///
55     Gray = cairo_antialias_t.CAIRO_ANTIALIAS_GRAY,
56     ///
57     Subpixel = cairo_antialias_t.CAIRO_ANTIALIAS_SUBPIXEL
58 }
59
60 ///
61 enum FillRule : int
62 {
63     ///
64     Winding = cairo_fill_rule_t.CAIRO_FILL_RULE_WINDING,
65     ///
66     EvenOdd = cairo_fill_rule_t.CAIRO_FILL_RULE_EVEN_ODD
67 }
68
69 ///
70 enum LineCap : int
71 {
72     ///
73     Butt = cairo_line_cap_t.CAIRO_LINE_CAP_BUTT,
74     ///
75     Round = cairo_line_cap_t.CAIRO_LINE_CAP_ROUND,
76     ///
77     Square = cairo_line_cap_t.CAIRO_LINE_CAP_SQUARE
78 }
79
80 ///
81 enum LineJoin : int
82 {
83     ///
84     Miter = cairo_line_join_t.CAIRO_LINE_JOIN_MITER,
85     ///
86     Round = cairo_line_join_t.CAIRO_LINE_JOIN_ROUND,
87     ///
88     Bevel = cairo_line_join_t.CAIRO_LINE_JOIN_BEVEL
89 }
90
91 ///
92 enum Operator : int
93 {
94     ///
95     Clear = cairo_operator_t.CAIRO_OPERATOR_CLEAR,
96
97     ///
98     Source = cairo_operator_t.CAIRO_OPERATOR_SOURCE,
99     ///
100     Over = cairo_operator_t.CAIRO_OPERATOR_OVER,
101     ///
102     In = cairo_operator_t.CAIRO_OPERATOR_IN,
103     ///
104     Out = cairo_operator_t.CAIRO_OPERATOR_OUT,
105     ///
106     Atop = cairo_operator_t.CAIRO_OPERATOR_ATOP,
107
108     ///
109     Dest = cairo_operator_t.CAIRO_OPERATOR_DEST,
110     ///
111     DestOver = cairo_operator_t.CAIRO_OPERATOR_DEST_OVER,
112     ///
113     DestIn = cairo_operator_t.CAIRO_OPERATOR_DEST_IN,
114     ///
115     DestOut = cairo_operator_t.CAIRO_OPERATOR_DEST_OUT,
116     ///
117     DestAtop = cairo_operator_t.CAIRO_OPERATOR_DEST_ATOP,
118
119     ///
120     Xor = cairo_operator_t.CAIRO_OPERATOR_XOR,
121     ///
122     Add = cairo_operator_t.CAIRO_OPERATOR_ADD,
123     ///
124     Saturate = cairo_operator_t.CAIRO_OPERATOR_SATURATE
125 }
126
127 ///
128 enum SubpixelOrder : int
129 {
130     ///
131     Default = cairo_subpixel_order_t.CAIRO_SUBPIXEL_ORDER_DEFAULT,
132     ///
133     RGB = cairo_subpixel_order_t.CAIRO_SUBPIXEL_ORDER_RGB,
134     ///
135     BGR = cairo_subpixel_order_t.CAIRO_SUBPIXEL_ORDER_BGR,
136     ///
137     VRGB = cairo_subpixel_order_t.CAIRO_SUBPIXEL_ORDER_VRGB,
138     ///
139     VBGR = cairo_subpixel_order_t.CAIRO_SUBPIXEL_ORDER_VBGR
140 }
141
142 ///
143 enum HintStyle : int
144 {
145     ///
146     Default = cairo_hint_style_t.CAIRO_HINT_STYLE_DEFAULT,
147     ///
148     None = cairo_hint_style_t.CAIRO_HINT_STYLE_NONE,
149     ///
150     Slight = cairo_hint_style_t.CAIRO_HINT_STYLE_SLIGHT,
151     ///
152     Medium = cairo_hint_style_t.CAIRO_HINT_STYLE_MEDIUM,
153     ///
154     Full = cairo_hint_style_t.CAIRO_HINT_STYLE_FULL
155 }
156
157 ///
158 enum HintMetrics : int
159 {
160     ///
161     Default = cairo_hint_metrics_t.CAIRO_HINT_METRICS_DEFAULT,
162     ///
163     Off = cairo_hint_metrics_t.CAIRO_HINT_METRICS_OFF,
164     ///
165     On = cairo_hint_metrics_t.CAIRO_HINT_METRICS_ON
166 }
167
168 ///
169 enum Extend : int
170 {
171     ///
172     None = cairo_extend_t.CAIRO_EXTEND_NONE,
173     ///
174     Repeat = cairo_extend_t.CAIRO_EXTEND_REPEAT,
175     ///
176     Reflect = cairo_extend_t.CAIRO_EXTEND_REFLECT
177 }
178
179 ///
180 enum Filter : int
181 {
182     ///
183     Fast = cairo_filter_t.CAIRO_FILTER_FAST,
184     ///
185     Good = cairo_filter_t.CAIRO_FILTER_GOOD,
186     ///
187     Best = cairo_filter_t.CAIRO_FILTER_BEST,
188     ///
189     Nearest = cairo_filter_t.CAIRO_FILTER_NEAREST,
190     ///
191     Bilinear = cairo_filter_t.CAIRO_FILTER_BILINEAR,
192     ///
193     Gaussian = cairo_filter_t.CAIRO_FILTER_GAUSSIAN
194 }
195
196 ///
197 enum FontSlant : int
198 {
199     ///
200     Normal = cairo_font_slant_t.CAIRO_FONT_SLANT_NORMAL,
201     ///
202     Italic = cairo_font_slant_t.CAIRO_FONT_SLANT_ITALIC,
203     ///
204     Oblique = cairo_font_slant_t.CAIRO_FONT_SLANT_OBLIQUE
205 }
206
207 ///
208 enum FontWeight : int
209 {
210     ///
211     Normal = cairo_font_weight_t.CAIRO_FONT_WEIGHT_NORMAL,
212     ///
213     Bold = cairo_font_weight_t.CAIRO_FONT_WEIGHT_BOLD
214 }
215
216 ///
217 enum Format : int
218 {
219     ///
220     ARGB32 = cairo_format_t.CAIRO_FORMAT_ARGB32,
221     ///
222     RGB24 = cairo_format_t.CAIRO_FORMAT_RGB24,
223     ///
224     A8 = cairo_format_t.CAIRO_FORMAT_A8,
225     ///
226     A1 = cairo_format_t.CAIRO_FORMAT_A1
227 }
228
229 ///
230 enum Content : int
231 {
232     ///
233     Color = cairo_content_t.CAIRO_CONTENT_COLOR,
234     ///
235     Alpha = cairo_content_t.CAIRO_CONTENT_ALPHA,
236     ///
237     ColorAlpha = cairo_content_t.CAIRO_CONTENT_COLOR_ALPHA
238 }
239
240 ///
241 enum PathDataType : int
242 {
243     ///
244     MoveTo = cairo_path_data_type_t.CAIRO_PATH_MOVE_TO,
245     ///
246     LineTo = cairo_path_data_type_t.CAIRO_PATH_LINE_TO,
247     ///
248     CurveTo = cairo_path_data_type_t.CAIRO_PATH_CURVE_TO,
249     ///
250     ClosePath = cairo_path_data_type_t.CAIRO_PATH_CLOSE_PATH
251 }
Note: See TracBrowser for help on using the browser.