1/* $Revision: 6838 $ on $Date:: 2008-11-04 11:46:08 +0000 #$ */
2
3/*------------------------------------------------------------------------
4 *
5 * OpenVG 1.1 Reference Implementation
6 * -------------------------------------
7 *
8 * Copyright (c) 2008 The Khronos Group Inc.
9 *
10 * Permission is hereby granted, free of charge, to any person obtaining a
11 * copy of this software and /or associated documentation files
12 * (the "Materials "), to deal in the Materials without restriction,
13 * including without limitation the rights to use, copy, modify, merge,
14 * publish, distribute, sublicense, and/or sell copies of the Materials,
15 * and to permit persons to whom the Materials are furnished to do so,
16 * subject to the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be included
19 * in all copies or substantial portions of the Materials.
20 *
21 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
25 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
26 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
27 * THE USE OR OTHER DEALINGS IN THE MATERIALS.
28 *
29 *//**
30 * \file
31 * \brief OpenVG 1.1 API.
32 *//*-------------------------------------------------------------------*/
33
34#ifndef _OPENVG_H
35#define _OPENVG_H
36
37#include "vgplatform.h"
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43#define OPENVG_VERSION_1_0 1
44#define OPENVG_VERSION_1_0_1 1
45#define OPENVG_VERSION_1_1 2
46
47#ifndef VG_MAXSHORT
48#define VG_MAXSHORT 0x7FFF
49#endif
50
51#ifndef VG_MAXINT
52#define VG_MAXINT 0x7FFFFFFF
53#endif
54
55#ifndef VG_MAX_ENUM
56#define VG_MAX_ENUM 0x7FFFFFFF
57#endif
58
59typedef VGuint VGHandle;
60
61typedef VGHandle VGPath;
62typedef VGHandle VGImage;
63typedef VGHandle VGMaskLayer;
64typedef VGHandle VGFont;
65typedef VGHandle VGPaint;
66
67#define VG_INVALID_HANDLE ((VGHandle)0)
68
69typedef VGuint VGboolean;
70#define VG_FALSE 0
71#define VG_TRUE 1
72
73typedef enum {
74 VG_NO_ERROR = 0,
75 VG_BAD_HANDLE_ERROR = 0x1000,
76 VG_ILLEGAL_ARGUMENT_ERROR = 0x1001,
77 VG_OUT_OF_MEMORY_ERROR = 0x1002,
78 VG_PATH_CAPABILITY_ERROR = 0x1003,
79 VG_UNSUPPORTED_IMAGE_FORMAT_ERROR = 0x1004,
80 VG_UNSUPPORTED_PATH_FORMAT_ERROR = 0x1005,
81 VG_IMAGE_IN_USE_ERROR = 0x1006,
82 VG_NO_CONTEXT_ERROR = 0x1007,
83
84 VG_ERROR_CODE_FORCE_SIZE = VG_MAX_ENUM
85} VGErrorCode;
86
87typedef enum {
88 /* Mode settings */
89 VG_MATRIX_MODE = 0x1100,
90 VG_FILL_RULE = 0x1101,
91 VG_IMAGE_QUALITY = 0x1102,
92 VG_RENDERING_QUALITY = 0x1103,
93 VG_BLEND_MODE = 0x1104,
94 VG_IMAGE_MODE = 0x1105,
95
96 /* Scissoring rectangles */
97 VG_SCISSOR_RECTS = 0x1106,
98
99 /* Color Transformation */
100 VG_COLOR_TRANSFORM = 0x1170,
101 VG_COLOR_TRANSFORM_VALUES = 0x1171,
102
103 /* Stroke parameters */
104 VG_STROKE_LINE_WIDTH = 0x1110,
105 VG_STROKE_CAP_STYLE = 0x1111,
106 VG_STROKE_JOIN_STYLE = 0x1112,
107 VG_STROKE_MITER_LIMIT = 0x1113,
108 VG_STROKE_DASH_PATTERN = 0x1114,
109 VG_STROKE_DASH_PHASE = 0x1115,
110 VG_STROKE_DASH_PHASE_RESET = 0x1116,
111
112 /* Edge fill color for VG_TILE_FILL tiling mode */
113 VG_TILE_FILL_COLOR = 0x1120,
114
115 /* Color for vgClear */
116 VG_CLEAR_COLOR = 0x1121,
117
118 /* Glyph origin */
119 VG_GLYPH_ORIGIN = 0x1122,
120
121 /* Enable/disable alpha masking and scissoring */
122 VG_MASKING = 0x1130,
123 VG_SCISSORING = 0x1131,
124
125 /* Pixel layout information */
126 VG_PIXEL_LAYOUT = 0x1140,
127 VG_SCREEN_LAYOUT = 0x1141,
128
129 /* Source format selection for image filters */
130 VG_FILTER_FORMAT_LINEAR = 0x1150,
131 VG_FILTER_FORMAT_PREMULTIPLIED = 0x1151,
132
133 /* Destination write enable mask for image filters */
134 VG_FILTER_CHANNEL_MASK = 0x1152,
135
136 /* Implementation limits (read-only) */
137 VG_MAX_SCISSOR_RECTS = 0x1160,
138 VG_MAX_DASH_COUNT = 0x1161,
139 VG_MAX_KERNEL_SIZE = 0x1162,
140 VG_MAX_SEPARABLE_KERNEL_SIZE = 0x1163,
141 VG_MAX_COLOR_RAMP_STOPS = 0x1164,
142 VG_MAX_IMAGE_WIDTH = 0x1165,
143 VG_MAX_IMAGE_HEIGHT = 0x1166,
144 VG_MAX_IMAGE_PIXELS = 0x1167,
145 VG_MAX_IMAGE_BYTES = 0x1168,
146 VG_MAX_FLOAT = 0x1169,
147 VG_MAX_GAUSSIAN_STD_DEVIATION = 0x116A,
148
149 VG_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
150} VGParamType;
151
152typedef enum {
153 VG_RENDERING_QUALITY_NONANTIALIASED = 0x1200,
154 VG_RENDERING_QUALITY_FASTER = 0x1201,
155 VG_RENDERING_QUALITY_BETTER = 0x1202, /* Default */
156
157 VG_RENDERING_QUALITY_FORCE_SIZE = VG_MAX_ENUM
158} VGRenderingQuality;
159
160typedef enum {
161 VG_PIXEL_LAYOUT_UNKNOWN = 0x1300,
162 VG_PIXEL_LAYOUT_RGB_VERTICAL = 0x1301,
163 VG_PIXEL_LAYOUT_BGR_VERTICAL = 0x1302,
164 VG_PIXEL_LAYOUT_RGB_HORIZONTAL = 0x1303,
165 VG_PIXEL_LAYOUT_BGR_HORIZONTAL = 0x1304,
166
167 VG_PIXEL_LAYOUT_FORCE_SIZE = VG_MAX_ENUM
168} VGPixelLayout;
169
170typedef enum {
171 VG_MATRIX_PATH_USER_TO_SURFACE = 0x1400,
172 VG_MATRIX_IMAGE_USER_TO_SURFACE = 0x1401,
173 VG_MATRIX_FILL_PAINT_TO_USER = 0x1402,
174 VG_MATRIX_STROKE_PAINT_TO_USER = 0x1403,
175 VG_MATRIX_GLYPH_USER_TO_SURFACE = 0x1404,
176
177 VG_MATRIX_MODE_FORCE_SIZE = VG_MAX_ENUM
178} VGMatrixMode;
179
180typedef enum {
181 VG_CLEAR_MASK = 0x1500,
182 VG_FILL_MASK = 0x1501,
183 VG_SET_MASK = 0x1502,
184 VG_UNION_MASK = 0x1503,
185 VG_INTERSECT_MASK = 0x1504,
186 VG_SUBTRACT_MASK = 0x1505,
187
188 VG_MASK_OPERATION_FORCE_SIZE = VG_MAX_ENUM
189} VGMaskOperation;
190
191#define VG_PATH_FORMAT_STANDARD 0
192
193typedef enum {
194 VG_PATH_DATATYPE_S_8 = 0,
195 VG_PATH_DATATYPE_S_16 = 1,
196 VG_PATH_DATATYPE_S_32 = 2,
197 VG_PATH_DATATYPE_F = 3,
198
199 VG_PATH_DATATYPE_FORCE_SIZE = VG_MAX_ENUM
200} VGPathDatatype;
201
202typedef enum {
203 VG_ABSOLUTE = 0,
204 VG_RELATIVE = 1,
205
206 VG_PATH_ABS_REL_FORCE_SIZE = VG_MAX_ENUM
207} VGPathAbsRel;
208
209typedef enum {
210 VG_CLOSE_PATH = ( 0 << 1),
211 VG_MOVE_TO = ( 1 << 1),
212 VG_LINE_TO = ( 2 << 1),
213 VG_HLINE_TO = ( 3 << 1),
214 VG_VLINE_TO = ( 4 << 1),
215 VG_QUAD_TO = ( 5 << 1),
216 VG_CUBIC_TO = ( 6 << 1),
217 VG_SQUAD_TO = ( 7 << 1),
218 VG_SCUBIC_TO = ( 8 << 1),
219 VG_SCCWARC_TO = ( 9 << 1),
220 VG_SCWARC_TO = (10 << 1),
221 VG_LCCWARC_TO = (11 << 1),
222 VG_LCWARC_TO = (12 << 1),
223
224 VG_SEGMENT_MASK = 0xf << 1,
225
226 VG_PATH_SEGMENT_FORCE_SIZE = VG_MAX_ENUM
227} VGPathSegment;
228
229typedef enum {
230 VG_MOVE_TO_ABS = VG_MOVE_TO | VG_ABSOLUTE,
231 VG_MOVE_TO_REL = VG_MOVE_TO | VG_RELATIVE,
232 VG_LINE_TO_ABS = VG_LINE_TO | VG_ABSOLUTE,
233 VG_LINE_TO_REL = VG_LINE_TO | VG_RELATIVE,
234 VG_HLINE_TO_ABS = VG_HLINE_TO | VG_ABSOLUTE,
235 VG_HLINE_TO_REL = VG_HLINE_TO | VG_RELATIVE,
236 VG_VLINE_TO_ABS = VG_VLINE_TO | VG_ABSOLUTE,
237 VG_VLINE_TO_REL = VG_VLINE_TO | VG_RELATIVE,
238 VG_QUAD_TO_ABS = VG_QUAD_TO | VG_ABSOLUTE,
239 VG_QUAD_TO_REL = VG_QUAD_TO | VG_RELATIVE,
240 VG_CUBIC_TO_ABS = VG_CUBIC_TO | VG_ABSOLUTE,
241 VG_CUBIC_TO_REL = VG_CUBIC_TO | VG_RELATIVE,
242 VG_SQUAD_TO_ABS = VG_SQUAD_TO | VG_ABSOLUTE,
243 VG_SQUAD_TO_REL = VG_SQUAD_TO | VG_RELATIVE,
244 VG_SCUBIC_TO_ABS = VG_SCUBIC_TO | VG_ABSOLUTE,
245 VG_SCUBIC_TO_REL = VG_SCUBIC_TO | VG_RELATIVE,
246 VG_SCCWARC_TO_ABS = VG_SCCWARC_TO | VG_ABSOLUTE,
247 VG_SCCWARC_TO_REL = VG_SCCWARC_TO | VG_RELATIVE,
248 VG_SCWARC_TO_ABS = VG_SCWARC_TO | VG_ABSOLUTE,
249 VG_SCWARC_TO_REL = VG_SCWARC_TO | VG_RELATIVE,
250 VG_LCCWARC_TO_ABS = VG_LCCWARC_TO | VG_ABSOLUTE,
251 VG_LCCWARC_TO_REL = VG_LCCWARC_TO | VG_RELATIVE,
252 VG_LCWARC_TO_ABS = VG_LCWARC_TO | VG_ABSOLUTE,
253 VG_LCWARC_TO_REL = VG_LCWARC_TO | VG_RELATIVE,
254
255 VG_PATH_COMMAND_FORCE_SIZE = VG_MAX_ENUM
256} VGPathCommand;
257
258typedef enum {
259 VG_PATH_CAPABILITY_APPEND_FROM = (1 << 0),
260 VG_PATH_CAPABILITY_APPEND_TO = (1 << 1),
261 VG_PATH_CAPABILITY_MODIFY = (1 << 2),
262 VG_PATH_CAPABILITY_TRANSFORM_FROM = (1 << 3),
263 VG_PATH_CAPABILITY_TRANSFORM_TO = (1 << 4),
264 VG_PATH_CAPABILITY_INTERPOLATE_FROM = (1 << 5),
265 VG_PATH_CAPABILITY_INTERPOLATE_TO = (1 << 6),
266 VG_PATH_CAPABILITY_PATH_LENGTH = (1 << 7),
267 VG_PATH_CAPABILITY_POINT_ALONG_PATH = (1 << 8),
268 VG_PATH_CAPABILITY_TANGENT_ALONG_PATH = (1 << 9),
269 VG_PATH_CAPABILITY_PATH_BOUNDS = (1 << 10),
270 VG_PATH_CAPABILITY_PATH_TRANSFORMED_BOUNDS = (1 << 11),
271 VG_PATH_CAPABILITY_ALL = (1 << 12) - 1,
272
273 VG_PATH_CAPABILITIES_FORCE_SIZE = VG_MAX_ENUM
274} VGPathCapabilities;
275
276typedef enum {
277 VG_PATH_FORMAT = 0x1600,
278 VG_PATH_DATATYPE = 0x1601,
279 VG_PATH_SCALE = 0x1602,
280 VG_PATH_BIAS = 0x1603,
281 VG_PATH_NUM_SEGMENTS = 0x1604,
282 VG_PATH_NUM_COORDS = 0x1605,
283
284 VG_PATH_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
285} VGPathParamType;
286
287typedef enum {
288 VG_CAP_BUTT = 0x1700,
289 VG_CAP_ROUND = 0x1701,
290 VG_CAP_SQUARE = 0x1702,
291
292 VG_CAP_STYLE_FORCE_SIZE = VG_MAX_ENUM
293} VGCapStyle;
294
295typedef enum {
296 VG_JOIN_MITER = 0x1800,
297 VG_JOIN_ROUND = 0x1801,
298 VG_JOIN_BEVEL = 0x1802,
299
300 VG_JOIN_STYLE_FORCE_SIZE = VG_MAX_ENUM
301} VGJoinStyle;
302
303typedef enum {
304 VG_EVEN_ODD = 0x1900,
305 VG_NON_ZERO = 0x1901,
306
307 VG_FILL_RULE_FORCE_SIZE = VG_MAX_ENUM
308} VGFillRule;
309
310typedef enum {
311 VG_STROKE_PATH = (1 << 0),
312 VG_FILL_PATH = (1 << 1),
313
314 VG_PAINT_MODE_FORCE_SIZE = VG_MAX_ENUM
315} VGPaintMode;
316
317typedef enum {
318 /* Color paint parameters */
319 VG_PAINT_TYPE = 0x1A00,
320 VG_PAINT_COLOR = 0x1A01,
321 VG_PAINT_COLOR_RAMP_SPREAD_MODE = 0x1A02,
322 VG_PAINT_COLOR_RAMP_PREMULTIPLIED = 0x1A07,
323 VG_PAINT_COLOR_RAMP_STOPS = 0x1A03,
324
325 /* Linear gradient paint parameters */
326 VG_PAINT_LINEAR_GRADIENT = 0x1A04,
327
328 /* Radial gradient paint parameters */
329 VG_PAINT_RADIAL_GRADIENT = 0x1A05,
330
331 /* Pattern paint parameters */
332 VG_PAINT_PATTERN_TILING_MODE = 0x1A06,
333
334 VG_PAINT_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
335} VGPaintParamType;
336
337typedef enum {
338 VG_PAINT_TYPE_COLOR = 0x1B00,
339 VG_PAINT_TYPE_LINEAR_GRADIENT = 0x1B01,
340 VG_PAINT_TYPE_RADIAL_GRADIENT = 0x1B02,
341 VG_PAINT_TYPE_PATTERN = 0x1B03,
342
343 VG_PAINT_TYPE_FORCE_SIZE = VG_MAX_ENUM
344} VGPaintType;
345
346typedef enum {
347 VG_COLOR_RAMP_SPREAD_PAD = 0x1C00,
348 VG_COLOR_RAMP_SPREAD_REPEAT = 0x1C01,
349 VG_COLOR_RAMP_SPREAD_REFLECT = 0x1C02,
350
351 VG_COLOR_RAMP_SPREAD_MODE_FORCE_SIZE = VG_MAX_ENUM
352} VGColorRampSpreadMode;
353
354typedef enum {
355 VG_TILE_FILL = 0x1D00,
356 VG_TILE_PAD = 0x1D01,
357 VG_TILE_REPEAT = 0x1D02,
358 VG_TILE_REFLECT = 0x1D03,
359
360 VG_TILING_MODE_FORCE_SIZE = VG_MAX_ENUM
361} VGTilingMode;
362
363typedef enum {
364 /* RGB{A,X} channel ordering */
365 VG_sRGBX_8888 = 0,
366 VG_sRGBA_8888 = 1,
367 VG_sRGBA_8888_PRE = 2,
368 VG_sRGB_565 = 3,
369 VG_sRGBA_5551 = 4,
370 VG_sRGBA_4444 = 5,
371 VG_sL_8 = 6,
372 VG_lRGBX_8888 = 7,
373 VG_lRGBA_8888 = 8,
374 VG_lRGBA_8888_PRE = 9,
375 VG_lL_8 = 10,
376 VG_A_8 = 11,
377 VG_BW_1 = 12,
378 VG_A_1 = 13,
379 VG_A_4 = 14,
380
381 /* {A,X}RGB channel ordering */
382 VG_sXRGB_8888 = 0 | (1 << 6),
383 VG_sARGB_8888 = 1 | (1 << 6),
384 VG_sARGB_8888_PRE = 2 | (1 << 6),
385 VG_sARGB_1555 = 4 | (1 << 6),
386 VG_sARGB_4444 = 5 | (1 << 6),
387 VG_lXRGB_8888 = 7 | (1 << 6),
388 VG_lARGB_8888 = 8 | (1 << 6),
389 VG_lARGB_8888_PRE = 9 | (1 << 6),
390
391 /* BGR{A,X} channel ordering */
392 VG_sBGRX_8888 = 0 | (1 << 7),
393 VG_sBGRA_8888 = 1 | (1 << 7),
394 VG_sBGRA_8888_PRE = 2 | (1 << 7),
395 VG_sBGR_565 = 3 | (1 << 7),
396 VG_sBGRA_5551 = 4 | (1 << 7),
397 VG_sBGRA_4444 = 5 | (1 << 7),
398 VG_lBGRX_8888 = 7 | (1 << 7),
399 VG_lBGRA_8888 = 8 | (1 << 7),
400 VG_lBGRA_8888_PRE = 9 | (1 << 7),
401
402 /* {A,X}BGR channel ordering */
403 VG_sXBGR_8888 = 0 | (1 << 6) | (1 << 7),
404 VG_sABGR_8888 = 1 | (1 << 6) | (1 << 7),
405 VG_sABGR_8888_PRE = 2 | (1 << 6) | (1 << 7),
406 VG_sABGR_1555 = 4 | (1 << 6) | (1 << 7),
407 VG_sABGR_4444 = 5 | (1 << 6) | (1 << 7),
408 VG_lXBGR_8888 = 7 | (1 << 6) | (1 << 7),
409 VG_lABGR_8888 = 8 | (1 << 6) | (1 << 7),
410 VG_lABGR_8888_PRE = 9 | (1 << 6) | (1 << 7),
411
412 VG_IMAGE_FORMAT_FORCE_SIZE = VG_MAX_ENUM
413} VGImageFormat;
414
415typedef enum {
416 VG_IMAGE_QUALITY_NONANTIALIASED = (1 << 0),
417 VG_IMAGE_QUALITY_FASTER = (1 << 1),
418 VG_IMAGE_QUALITY_BETTER = (1 << 2),
419
420 VG_IMAGE_QUALITY_FORCE_SIZE = VG_MAX_ENUM
421} VGImageQuality;
422
423typedef enum {
424 VG_IMAGE_FORMAT = 0x1E00,
425 VG_IMAGE_WIDTH = 0x1E01,
426 VG_IMAGE_HEIGHT = 0x1E02,
427
428 VG_IMAGE_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
429} VGImageParamType;
430
431typedef enum {
432 VG_DRAW_IMAGE_NORMAL = 0x1F00,
433 VG_DRAW_IMAGE_MULTIPLY = 0x1F01,
434 VG_DRAW_IMAGE_STENCIL = 0x1F02,
435
436 VG_IMAGE_MODE_FORCE_SIZE = VG_MAX_ENUM
437} VGImageMode;
438
439typedef enum {
440 VG_RED = (1 << 3),
441 VG_GREEN = (1 << 2),
442 VG_BLUE = (1 << 1),
443 VG_ALPHA = (1 << 0),
444
445 VG_IMAGE_CHANNEL_FORCE_SIZE = VG_MAX_ENUM
446} VGImageChannel;
447
448typedef enum {
449 VG_BLEND_SRC = 0x2000,
450 VG_BLEND_SRC_OVER = 0x2001,
451 VG_BLEND_DST_OVER = 0x2002,
452 VG_BLEND_SRC_IN = 0x2003,
453 VG_BLEND_DST_IN = 0x2004,
454 VG_BLEND_MULTIPLY = 0x2005,
455 VG_BLEND_SCREEN = 0x2006,
456 VG_BLEND_DARKEN = 0x2007,
457 VG_BLEND_LIGHTEN = 0x2008,
458 VG_BLEND_ADDITIVE = 0x2009,
459
460 VG_BLEND_MODE_FORCE_SIZE = VG_MAX_ENUM
461} VGBlendMode;
462
463typedef enum {
464 VG_FONT_NUM_GLYPHS = 0x2F00,
465
466 VG_FONT_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
467} VGFontParamType;
468
469typedef enum {
470 VG_IMAGE_FORMAT_QUERY = 0x2100,
471 VG_PATH_DATATYPE_QUERY = 0x2101,
472
473 VG_HARDWARE_QUERY_TYPE_FORCE_SIZE = VG_MAX_ENUM
474} VGHardwareQueryType;
475
476typedef enum {
477 VG_HARDWARE_ACCELERATED = 0x2200,
478 VG_HARDWARE_UNACCELERATED = 0x2201,
479
480 VG_HARDWARE_QUERY_RESULT_FORCE_SIZE = VG_MAX_ENUM
481} VGHardwareQueryResult;
482
483typedef enum {
484 VG_VENDOR = 0x2300,
485 VG_RENDERER = 0x2301,
486 VG_VERSION = 0x2302,
487 VG_EXTENSIONS = 0x2303,
488
489 VG_STRING_ID_FORCE_SIZE = VG_MAX_ENUM
490} VGStringID;
491
492/* Function Prototypes */
493
494#ifndef VG_API_CALL
495# error VG_API_CALL must be defined
496#endif
497
498#ifndef VG_API_ENTRY
499# error VG_API_ENTRY must be defined
500#endif
501
502#ifndef VG_API_EXIT
503# error VG_API_EXIT must be defined
504#endif
505
506VG_API_CALL VGErrorCode VG_API_ENTRY vgGetError(void) VG_API_EXIT;
507
508VG_API_CALL void VG_API_ENTRY vgFlush(void) VG_API_EXIT;
509VG_API_CALL void VG_API_ENTRY vgFinish(void) VG_API_EXIT;
510
511/* Getters and Setters */
512VG_API_CALL void VG_API_ENTRY vgSetf (VGParamType type, VGfloat value) VG_API_EXIT;
513VG_API_CALL void VG_API_ENTRY vgSeti (VGParamType type, VGint value) VG_API_EXIT;
514VG_API_CALL void VG_API_ENTRY vgSetfv(VGParamType type, VGint count,
515 const VGfloat * values) VG_API_EXIT;
516VG_API_CALL void VG_API_ENTRY vgSetiv(VGParamType type, VGint count,
517 const VGint * values) VG_API_EXIT;
518
519VG_API_CALL VGfloat VG_API_ENTRY vgGetf(VGParamType type) VG_API_EXIT;
520VG_API_CALL VGint VG_API_ENTRY vgGeti(VGParamType type) VG_API_EXIT;
521VG_API_CALL VGint VG_API_ENTRY vgGetVectorSize(VGParamType type) VG_API_EXIT;
522VG_API_CALL void VG_API_ENTRY vgGetfv(VGParamType type, VGint count, VGfloat * values) VG_API_EXIT;
523VG_API_CALL void VG_API_ENTRY vgGetiv(VGParamType type, VGint count, VGint * values) VG_API_EXIT;
524
525VG_API_CALL void VG_API_ENTRY vgSetParameterf(VGHandle object,
526 VGint paramType,
527 VGfloat value) VG_API_EXIT;
528VG_API_CALL void VG_API_ENTRY vgSetParameteri(VGHandle object,
529 VGint paramType,
530 VGint value) VG_API_EXIT;
531VG_API_CALL void VG_API_ENTRY vgSetParameterfv(VGHandle object,
532 VGint paramType,
533 VGint count, const VGfloat * values) VG_API_EXIT;
534VG_API_CALL void VG_API_ENTRY vgSetParameteriv(VGHandle object,
535 VGint paramType,
536 VGint count, const VGint * values) VG_API_EXIT;
537
538VG_API_CALL VGfloat VG_API_ENTRY vgGetParameterf(VGHandle object,
539 VGint paramType) VG_API_EXIT;
540VG_API_CALL VGint VG_API_ENTRY vgGetParameteri(VGHandle object,
541 VGint paramType);
542VG_API_CALL VGint VG_API_ENTRY vgGetParameterVectorSize(VGHandle object,
543 VGint paramType) VG_API_EXIT;
544VG_API_CALL void VG_API_ENTRY vgGetParameterfv(VGHandle object,
545 VGint paramType,
546 VGint count, VGfloat * values) VG_API_EXIT;
547VG_API_CALL void VG_API_ENTRY vgGetParameteriv(VGHandle object,
548 VGint paramType,
549 VGint count, VGint * values) VG_API_EXIT;
550
551/* Matrix Manipulation */
552VG_API_CALL void VG_API_ENTRY vgLoadIdentity(void) VG_API_EXIT;
553VG_API_CALL void VG_API_ENTRY vgLoadMatrix(const VGfloat * m) VG_API_EXIT;
554VG_API_CALL void VG_API_ENTRY vgGetMatrix(VGfloat * m) VG_API_EXIT;
555VG_API_CALL void VG_API_ENTRY vgMultMatrix(const VGfloat * m) VG_API_EXIT;
556VG_API_CALL void VG_API_ENTRY vgTranslate(VGfloat tx, VGfloat ty) VG_API_EXIT;
557VG_API_CALL void VG_API_ENTRY vgScale(VGfloat sx, VGfloat sy) VG_API_EXIT;
558VG_API_CALL void VG_API_ENTRY vgShear(VGfloat shx, VGfloat shy) VG_API_EXIT;
559VG_API_CALL void VG_API_ENTRY vgRotate(VGfloat angle) VG_API_EXIT;
560
561/* Masking and Clearing */
562VG_API_CALL void VG_API_ENTRY vgMask(VGHandle mask, VGMaskOperation operation,
563 VGint x, VGint y,
564 VGint width, VGint height) VG_API_EXIT;
565VG_API_CALL void VG_API_ENTRY vgRenderToMask(VGPath path,
566 VGbitfield paintModes,
567 VGMaskOperation operation) VG_API_EXIT;
568VG_API_CALL VGMaskLayer VG_API_ENTRY vgCreateMaskLayer(VGint width, VGint height) VG_API_EXIT;
569VG_API_CALL void VG_API_ENTRY vgDestroyMaskLayer(VGMaskLayer maskLayer) VG_API_EXIT;
570VG_API_CALL void VG_API_ENTRY vgFillMaskLayer(VGMaskLayer maskLayer,
571 VGint x, VGint y,
572 VGint width, VGint height,
573 VGfloat value) VG_API_EXIT;
574VG_API_CALL void VG_API_ENTRY vgCopyMask(VGMaskLayer maskLayer,
575 VGint dx, VGint dy,
576 VGint sx, VGint sy,
577 VGint width, VGint height) VG_API_EXIT;
578VG_API_CALL void VG_API_ENTRY vgClear(VGint x, VGint y, VGint width, VGint height) VG_API_EXIT;
579
580/* Paths */
581VG_API_CALL VGPath VG_API_ENTRY vgCreatePath(VGint pathFormat,
582 VGPathDatatype datatype,
583 VGfloat scale, VGfloat bias,
584 VGint segmentCapacityHint,
585 VGint coordCapacityHint,
586 VGbitfield capabilities) VG_API_EXIT;
587VG_API_CALL void VG_API_ENTRY vgClearPath(VGPath path, VGbitfield capabilities) VG_API_EXIT;
588VG_API_CALL void VG_API_ENTRY vgDestroyPath(VGPath path) VG_API_EXIT;
589VG_API_CALL void VG_API_ENTRY vgRemovePathCapabilities(VGPath path,
590 VGbitfield capabilities) VG_API_EXIT;
591VG_API_CALL VGbitfield VG_API_ENTRY vgGetPathCapabilities(VGPath path) VG_API_EXIT;
592VG_API_CALL void VG_API_ENTRY vgAppendPath(VGPath dstPath, VGPath srcPath) VG_API_EXIT;
593VG_API_CALL void VG_API_ENTRY vgAppendPathData(VGPath dstPath,
594 VGint numSegments,
595 const VGubyte * pathSegments,
596 const void * pathData) VG_API_EXIT;
597VG_API_CALL void VG_API_ENTRY vgModifyPathCoords(VGPath dstPath, VGint startIndex,
598 VGint numSegments,
599 const void * pathData) VG_API_EXIT;
600VG_API_CALL void VG_API_ENTRY vgTransformPath(VGPath dstPath, VGPath srcPath) VG_API_EXIT;
601VG_API_CALL VGboolean VG_API_ENTRY vgInterpolatePath(VGPath dstPath,
602 VGPath startPath,
603 VGPath endPath,
604 VGfloat amount) VG_API_EXIT;
605VG_API_CALL VGfloat VG_API_ENTRY vgPathLength(VGPath path,
606 VGint startSegment, VGint numSegments) VG_API_EXIT;
607VG_API_CALL void VG_API_ENTRY vgPointAlongPath(VGPath path,
608 VGint startSegment, VGint numSegments,
609 VGfloat distance,
610 VGfloat * x, VGfloat * y,
611 VGfloat * tangentX, VGfloat * tangentY) VG_API_EXIT;
612VG_API_CALL void VG_API_ENTRY vgPathBounds(VGPath path,
613 VGfloat * minX, VGfloat * minY,
614 VGfloat * width, VGfloat * height) VG_API_EXIT;
615VG_API_CALL void VG_API_ENTRY vgPathTransformedBounds(VGPath path,
616 VGfloat * minX, VGfloat * minY,
617 VGfloat * width, VGfloat * height) VG_API_EXIT;
618VG_API_CALL void VG_API_ENTRY vgDrawPath(VGPath path, VGbitfield paintModes) VG_API_EXIT;
619
620/* Paint */
621VG_API_CALL VGPaint VG_API_ENTRY vgCreatePaint(void) VG_API_EXIT;
622VG_API_CALL void VG_API_ENTRY vgDestroyPaint(VGPaint paint) VG_API_EXIT;
623VG_API_CALL void VG_API_ENTRY vgSetPaint(VGPaint paint, VGbitfield paintModes) VG_API_EXIT;
624VG_API_CALL VGPaint VG_API_ENTRY vgGetPaint(VGPaintMode paintMode) VG_API_EXIT;
625VG_API_CALL void VG_API_ENTRY vgSetColor(VGPaint paint, VGuint rgba) VG_API_EXIT;
626VG_API_CALL VGuint VG_API_ENTRY vgGetColor(VGPaint paint) VG_API_EXIT;
627VG_API_CALL void VG_API_ENTRY vgPaintPattern(VGPaint paint, VGImage pattern) VG_API_EXIT;
628
629/* Images */
630VG_API_CALL VGImage VG_API_ENTRY vgCreateImage(VGImageFormat format,
631 VGint width, VGint height,
632 VGbitfield allowedQuality) VG_API_EXIT;
633VG_API_CALL void VG_API_ENTRY vgDestroyImage(VGImage image) VG_API_EXIT;
634VG_API_CALL void VG_API_ENTRY vgClearImage(VGImage image,
635 VGint x, VGint y, VGint width, VGint height) VG_API_EXIT;
636VG_API_CALL void VG_API_ENTRY vgImageSubData(VGImage image,
637 const void * data, VGint dataStride,
638 VGImageFormat dataFormat,
639 VGint x, VGint y, VGint width, VGint height) VG_API_EXIT;
640VG_API_CALL void VG_API_ENTRY vgGetImageSubData(VGImage image,
641 void * data, VGint dataStride,
642 VGImageFormat dataFormat,
643 VGint x, VGint y,
644 VGint width, VGint height) VG_API_EXIT;
645VG_API_CALL VGImage VG_API_ENTRY vgChildImage(VGImage parent,
646 VGint x, VGint y, VGint width, VGint height) VG_API_EXIT;
647VG_API_CALL VGImage VG_API_ENTRY vgGetParent(VGImage image) VG_API_EXIT;
648VG_API_CALL void VG_API_ENTRY vgCopyImage(VGImage dst, VGint dx, VGint dy,
649 VGImage src, VGint sx, VGint sy,
650 VGint width, VGint height,
651 VGboolean dither) VG_API_EXIT;
652VG_API_CALL void VG_API_ENTRY vgDrawImage(VGImage image) VG_API_EXIT;
653VG_API_CALL void VG_API_ENTRY vgSetPixels(VGint dx, VGint dy,
654 VGImage src, VGint sx, VGint sy,
655 VGint width, VGint height) VG_API_EXIT;
656VG_API_CALL void VG_API_ENTRY vgWritePixels(const void * data, VGint dataStride,
657 VGImageFormat dataFormat,
658 VGint dx, VGint dy,
659 VGint width, VGint height) VG_API_EXIT;
660VG_API_CALL void VG_API_ENTRY vgGetPixels(VGImage dst, VGint dx, VGint dy,
661 VGint sx, VGint sy,
662 VGint width, VGint height) VG_API_EXIT;
663VG_API_CALL void VG_API_ENTRY vgReadPixels(void * data, VGint dataStride,
664 VGImageFormat dataFormat,
665 VGint sx, VGint sy,
666 VGint width, VGint height) VG_API_EXIT;
667VG_API_CALL void VG_API_ENTRY vgCopyPixels(VGint dx, VGint dy,
668 VGint sx, VGint sy,
669 VGint width, VGint height) VG_API_EXIT;
670
671/* Text */
672VG_API_CALL VGFont VG_API_ENTRY vgCreateFont(VGint glyphCapacityHint) VG_API_EXIT;
673VG_API_CALL void VG_API_ENTRY vgDestroyFont(VGFont font) VG_API_EXIT;
674VG_API_CALL void VG_API_ENTRY vgSetGlyphToPath(VGFont font,
675 VGuint glyphIndex,
676 VGPath path,
677 VGboolean isHinted,
678 VGfloat glyphOrigin [2],
679 VGfloat escapement[2]) VG_API_EXIT;
680VG_API_CALL void VG_API_ENTRY vgSetGlyphToImage(VGFont font,
681 VGuint glyphIndex,
682 VGImage image,
683 VGfloat glyphOrigin [2],
684 VGfloat escapement[2]) VG_API_EXIT;
685VG_API_CALL void VG_API_ENTRY vgClearGlyph(VGFont font,VGuint glyphIndex) VG_API_EXIT;
686VG_API_CALL void VG_API_ENTRY vgDrawGlyph(VGFont font,
687 VGuint glyphIndex,
688 VGbitfield paintModes,
689 VGboolean allowAutoHinting) VG_API_EXIT;
690VG_API_CALL void VG_API_ENTRY vgDrawGlyphs(VGFont font,
691 VGint glyphCount,
692 const VGuint *glyphIndices,
693 const VGfloat *adjustments_x,
694 const VGfloat *adjustments_y,
695 VGbitfield paintModes,
696 VGboolean allowAutoHinting) VG_API_EXIT;
697
698/* Image Filters */
699VG_API_CALL void VG_API_ENTRY vgColorMatrix(VGImage dst, VGImage src,
700 const VGfloat * matrix) VG_API_EXIT;
701VG_API_CALL void VG_API_ENTRY vgConvolve(VGImage dst, VGImage src,
702 VGint kernelWidth, VGint kernelHeight,
703 VGint shiftX, VGint shiftY,
704 const VGshort * kernel,
705 VGfloat scale,
706 VGfloat bias,
707 VGTilingMode tilingMode) VG_API_EXIT;
708VG_API_CALL void VG_API_ENTRY vgSeparableConvolve(VGImage dst, VGImage src,
709 VGint kernelWidth,
710 VGint kernelHeight,
711 VGint shiftX, VGint shiftY,
712 const VGshort * kernelX,
713 const VGshort * kernelY,
714 VGfloat scale,
715 VGfloat bias,
716 VGTilingMode tilingMode) VG_API_EXIT;
717VG_API_CALL void VG_API_ENTRY vgGaussianBlur(VGImage dst, VGImage src,
718 VGfloat stdDeviationX,
719 VGfloat stdDeviationY,
720 VGTilingMode tilingMode) VG_API_EXIT;
721VG_API_CALL void VG_API_ENTRY vgLookup(VGImage dst, VGImage src,
722 const VGubyte * redLUT,
723 const VGubyte * greenLUT,
724 const VGubyte * blueLUT,
725 const VGubyte * alphaLUT,
726 VGboolean outputLinear,
727 VGboolean outputPremultiplied) VG_API_EXIT;
728VG_API_CALL void VG_API_ENTRY vgLookupSingle(VGImage dst, VGImage src,
729 const VGuint * lookupTable,
730 VGImageChannel sourceChannel,
731 VGboolean outputLinear,
732 VGboolean outputPremultiplied) VG_API_EXIT;
733
734/* Hardware Queries */
735VG_API_CALL VGHardwareQueryResult VG_API_ENTRY vgHardwareQuery(VGHardwareQueryType key,
736 VGint setting) VG_API_EXIT;
737
738/* Renderer and Extension Information */
739VG_API_CALL const VGubyte * VG_API_ENTRY vgGetString(VGStringID name) VG_API_EXIT;
740
741#ifdef __cplusplus
742} /* extern "C" */
743#endif
744
745#endif /* _OPENVG_H */
746