1 /* $Revision: 9203 $ on $Date:: 2009-10-07 02:21:52 -0700 #$ */
3 /*------------------------------------------------------------------------
5 * OpenVG 1.1 Reference Implementation
6 * -------------------------------------
8 * Copyright (c) 2008 The Khronos Group Inc.
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:
18 * The above copyright notice and this permission notice shall be included
19 * in all copies or substantial portions of the Materials.
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.
31 * \brief OpenVG 1.1 API.
32 *//*-------------------------------------------------------------------*/
37 #include <VG/vgplatform.h>
43 #define OPENVG_VERSION_1_0 1
44 #define OPENVG_VERSION_1_0_1 1
45 #define OPENVG_VERSION_1_1 2
48 #define VG_MAXSHORT 0x7FFF
52 #define VG_MAXINT 0x7FFFFFFF
56 #define VG_MAX_ENUM 0x7FFFFFFF
59 typedef VGuint VGHandle
;
61 typedef VGHandle VGPath
;
62 typedef VGHandle VGImage
;
63 typedef VGHandle VGMaskLayer
;
64 typedef VGHandle VGFont
;
65 typedef VGHandle VGPaint
;
67 #define VG_INVALID_HANDLE ((VGHandle)0)
73 VG_BOOLEAN_FORCE_SIZE
= VG_MAX_ENUM
78 VG_BAD_HANDLE_ERROR
= 0x1000,
79 VG_ILLEGAL_ARGUMENT_ERROR
= 0x1001,
80 VG_OUT_OF_MEMORY_ERROR
= 0x1002,
81 VG_PATH_CAPABILITY_ERROR
= 0x1003,
82 VG_UNSUPPORTED_IMAGE_FORMAT_ERROR
= 0x1004,
83 VG_UNSUPPORTED_PATH_FORMAT_ERROR
= 0x1005,
84 VG_IMAGE_IN_USE_ERROR
= 0x1006,
85 VG_NO_CONTEXT_ERROR
= 0x1007,
87 VG_ERROR_CODE_FORCE_SIZE
= VG_MAX_ENUM
92 VG_MATRIX_MODE
= 0x1100,
93 VG_FILL_RULE
= 0x1101,
94 VG_IMAGE_QUALITY
= 0x1102,
95 VG_RENDERING_QUALITY
= 0x1103,
96 VG_BLEND_MODE
= 0x1104,
97 VG_IMAGE_MODE
= 0x1105,
99 /* Scissoring rectangles */
100 VG_SCISSOR_RECTS
= 0x1106,
102 /* Color Transformation */
103 VG_COLOR_TRANSFORM
= 0x1170,
104 VG_COLOR_TRANSFORM_VALUES
= 0x1171,
106 /* Stroke parameters */
107 VG_STROKE_LINE_WIDTH
= 0x1110,
108 VG_STROKE_CAP_STYLE
= 0x1111,
109 VG_STROKE_JOIN_STYLE
= 0x1112,
110 VG_STROKE_MITER_LIMIT
= 0x1113,
111 VG_STROKE_DASH_PATTERN
= 0x1114,
112 VG_STROKE_DASH_PHASE
= 0x1115,
113 VG_STROKE_DASH_PHASE_RESET
= 0x1116,
115 /* Edge fill color for VG_TILE_FILL tiling mode */
116 VG_TILE_FILL_COLOR
= 0x1120,
118 /* Color for vgClear */
119 VG_CLEAR_COLOR
= 0x1121,
122 VG_GLYPH_ORIGIN
= 0x1122,
124 /* Enable/disable alpha masking and scissoring */
126 VG_SCISSORING
= 0x1131,
128 /* Pixel layout information */
129 VG_PIXEL_LAYOUT
= 0x1140,
130 VG_SCREEN_LAYOUT
= 0x1141,
132 /* Source format selection for image filters */
133 VG_FILTER_FORMAT_LINEAR
= 0x1150,
134 VG_FILTER_FORMAT_PREMULTIPLIED
= 0x1151,
136 /* Destination write enable mask for image filters */
137 VG_FILTER_CHANNEL_MASK
= 0x1152,
139 /* Implementation limits (read-only) */
140 VG_MAX_SCISSOR_RECTS
= 0x1160,
141 VG_MAX_DASH_COUNT
= 0x1161,
142 VG_MAX_KERNEL_SIZE
= 0x1162,
143 VG_MAX_SEPARABLE_KERNEL_SIZE
= 0x1163,
144 VG_MAX_COLOR_RAMP_STOPS
= 0x1164,
145 VG_MAX_IMAGE_WIDTH
= 0x1165,
146 VG_MAX_IMAGE_HEIGHT
= 0x1166,
147 VG_MAX_IMAGE_PIXELS
= 0x1167,
148 VG_MAX_IMAGE_BYTES
= 0x1168,
149 VG_MAX_FLOAT
= 0x1169,
150 VG_MAX_GAUSSIAN_STD_DEVIATION
= 0x116A,
152 VG_PARAM_TYPE_FORCE_SIZE
= VG_MAX_ENUM
156 VG_RENDERING_QUALITY_NONANTIALIASED
= 0x1200,
157 VG_RENDERING_QUALITY_FASTER
= 0x1201,
158 VG_RENDERING_QUALITY_BETTER
= 0x1202, /* Default */
160 VG_RENDERING_QUALITY_FORCE_SIZE
= VG_MAX_ENUM
161 } VGRenderingQuality
;
164 VG_PIXEL_LAYOUT_UNKNOWN
= 0x1300,
165 VG_PIXEL_LAYOUT_RGB_VERTICAL
= 0x1301,
166 VG_PIXEL_LAYOUT_BGR_VERTICAL
= 0x1302,
167 VG_PIXEL_LAYOUT_RGB_HORIZONTAL
= 0x1303,
168 VG_PIXEL_LAYOUT_BGR_HORIZONTAL
= 0x1304,
170 VG_PIXEL_LAYOUT_FORCE_SIZE
= VG_MAX_ENUM
174 VG_MATRIX_PATH_USER_TO_SURFACE
= 0x1400,
175 VG_MATRIX_IMAGE_USER_TO_SURFACE
= 0x1401,
176 VG_MATRIX_FILL_PAINT_TO_USER
= 0x1402,
177 VG_MATRIX_STROKE_PAINT_TO_USER
= 0x1403,
178 VG_MATRIX_GLYPH_USER_TO_SURFACE
= 0x1404,
180 VG_MATRIX_MODE_FORCE_SIZE
= VG_MAX_ENUM
184 VG_CLEAR_MASK
= 0x1500,
185 VG_FILL_MASK
= 0x1501,
186 VG_SET_MASK
= 0x1502,
187 VG_UNION_MASK
= 0x1503,
188 VG_INTERSECT_MASK
= 0x1504,
189 VG_SUBTRACT_MASK
= 0x1505,
191 VG_MASK_OPERATION_FORCE_SIZE
= VG_MAX_ENUM
194 #define VG_PATH_FORMAT_STANDARD 0
197 VG_PATH_DATATYPE_S_8
= 0,
198 VG_PATH_DATATYPE_S_16
= 1,
199 VG_PATH_DATATYPE_S_32
= 2,
200 VG_PATH_DATATYPE_F
= 3,
202 VG_PATH_DATATYPE_FORCE_SIZE
= VG_MAX_ENUM
209 VG_PATH_ABS_REL_FORCE_SIZE
= VG_MAX_ENUM
213 VG_CLOSE_PATH
= ( 0 << 1),
214 VG_MOVE_TO
= ( 1 << 1),
215 VG_LINE_TO
= ( 2 << 1),
216 VG_HLINE_TO
= ( 3 << 1),
217 VG_VLINE_TO
= ( 4 << 1),
218 VG_QUAD_TO
= ( 5 << 1),
219 VG_CUBIC_TO
= ( 6 << 1),
220 VG_SQUAD_TO
= ( 7 << 1),
221 VG_SCUBIC_TO
= ( 8 << 1),
222 VG_SCCWARC_TO
= ( 9 << 1),
223 VG_SCWARC_TO
= (10 << 1),
224 VG_LCCWARC_TO
= (11 << 1),
225 VG_LCWARC_TO
= (12 << 1),
227 VG_PATH_SEGMENT_FORCE_SIZE
= VG_MAX_ENUM
231 VG_MOVE_TO_ABS
= VG_MOVE_TO
| VG_ABSOLUTE
,
232 VG_MOVE_TO_REL
= VG_MOVE_TO
| VG_RELATIVE
,
233 VG_LINE_TO_ABS
= VG_LINE_TO
| VG_ABSOLUTE
,
234 VG_LINE_TO_REL
= VG_LINE_TO
| VG_RELATIVE
,
235 VG_HLINE_TO_ABS
= VG_HLINE_TO
| VG_ABSOLUTE
,
236 VG_HLINE_TO_REL
= VG_HLINE_TO
| VG_RELATIVE
,
237 VG_VLINE_TO_ABS
= VG_VLINE_TO
| VG_ABSOLUTE
,
238 VG_VLINE_TO_REL
= VG_VLINE_TO
| VG_RELATIVE
,
239 VG_QUAD_TO_ABS
= VG_QUAD_TO
| VG_ABSOLUTE
,
240 VG_QUAD_TO_REL
= VG_QUAD_TO
| VG_RELATIVE
,
241 VG_CUBIC_TO_ABS
= VG_CUBIC_TO
| VG_ABSOLUTE
,
242 VG_CUBIC_TO_REL
= VG_CUBIC_TO
| VG_RELATIVE
,
243 VG_SQUAD_TO_ABS
= VG_SQUAD_TO
| VG_ABSOLUTE
,
244 VG_SQUAD_TO_REL
= VG_SQUAD_TO
| VG_RELATIVE
,
245 VG_SCUBIC_TO_ABS
= VG_SCUBIC_TO
| VG_ABSOLUTE
,
246 VG_SCUBIC_TO_REL
= VG_SCUBIC_TO
| VG_RELATIVE
,
247 VG_SCCWARC_TO_ABS
= VG_SCCWARC_TO
| VG_ABSOLUTE
,
248 VG_SCCWARC_TO_REL
= VG_SCCWARC_TO
| VG_RELATIVE
,
249 VG_SCWARC_TO_ABS
= VG_SCWARC_TO
| VG_ABSOLUTE
,
250 VG_SCWARC_TO_REL
= VG_SCWARC_TO
| VG_RELATIVE
,
251 VG_LCCWARC_TO_ABS
= VG_LCCWARC_TO
| VG_ABSOLUTE
,
252 VG_LCCWARC_TO_REL
= VG_LCCWARC_TO
| VG_RELATIVE
,
253 VG_LCWARC_TO_ABS
= VG_LCWARC_TO
| VG_ABSOLUTE
,
254 VG_LCWARC_TO_REL
= VG_LCWARC_TO
| VG_RELATIVE
,
256 VG_PATH_COMMAND_FORCE_SIZE
= VG_MAX_ENUM
260 VG_PATH_CAPABILITY_APPEND_FROM
= (1 << 0),
261 VG_PATH_CAPABILITY_APPEND_TO
= (1 << 1),
262 VG_PATH_CAPABILITY_MODIFY
= (1 << 2),
263 VG_PATH_CAPABILITY_TRANSFORM_FROM
= (1 << 3),
264 VG_PATH_CAPABILITY_TRANSFORM_TO
= (1 << 4),
265 VG_PATH_CAPABILITY_INTERPOLATE_FROM
= (1 << 5),
266 VG_PATH_CAPABILITY_INTERPOLATE_TO
= (1 << 6),
267 VG_PATH_CAPABILITY_PATH_LENGTH
= (1 << 7),
268 VG_PATH_CAPABILITY_POINT_ALONG_PATH
= (1 << 8),
269 VG_PATH_CAPABILITY_TANGENT_ALONG_PATH
= (1 << 9),
270 VG_PATH_CAPABILITY_PATH_BOUNDS
= (1 << 10),
271 VG_PATH_CAPABILITY_PATH_TRANSFORMED_BOUNDS
= (1 << 11),
272 VG_PATH_CAPABILITY_ALL
= (1 << 12) - 1,
274 VG_PATH_CAPABILITIES_FORCE_SIZE
= VG_MAX_ENUM
275 } VGPathCapabilities
;
278 VG_PATH_FORMAT
= 0x1600,
279 VG_PATH_DATATYPE
= 0x1601,
280 VG_PATH_SCALE
= 0x1602,
281 VG_PATH_BIAS
= 0x1603,
282 VG_PATH_NUM_SEGMENTS
= 0x1604,
283 VG_PATH_NUM_COORDS
= 0x1605,
285 VG_PATH_PARAM_TYPE_FORCE_SIZE
= VG_MAX_ENUM
289 VG_CAP_BUTT
= 0x1700,
290 VG_CAP_ROUND
= 0x1701,
291 VG_CAP_SQUARE
= 0x1702,
293 VG_CAP_STYLE_FORCE_SIZE
= VG_MAX_ENUM
297 VG_JOIN_MITER
= 0x1800,
298 VG_JOIN_ROUND
= 0x1801,
299 VG_JOIN_BEVEL
= 0x1802,
301 VG_JOIN_STYLE_FORCE_SIZE
= VG_MAX_ENUM
305 VG_EVEN_ODD
= 0x1900,
306 VG_NON_ZERO
= 0x1901,
308 VG_FILL_RULE_FORCE_SIZE
= VG_MAX_ENUM
312 VG_STROKE_PATH
= (1 << 0),
313 VG_FILL_PATH
= (1 << 1),
315 VG_PAINT_MODE_FORCE_SIZE
= VG_MAX_ENUM
319 /* Color paint parameters */
320 VG_PAINT_TYPE
= 0x1A00,
321 VG_PAINT_COLOR
= 0x1A01,
322 VG_PAINT_COLOR_RAMP_SPREAD_MODE
= 0x1A02,
323 VG_PAINT_COLOR_RAMP_PREMULTIPLIED
= 0x1A07,
324 VG_PAINT_COLOR_RAMP_STOPS
= 0x1A03,
326 /* Linear gradient paint parameters */
327 VG_PAINT_LINEAR_GRADIENT
= 0x1A04,
329 /* Radial gradient paint parameters */
330 VG_PAINT_RADIAL_GRADIENT
= 0x1A05,
332 /* Pattern paint parameters */
333 VG_PAINT_PATTERN_TILING_MODE
= 0x1A06,
335 VG_PAINT_PARAM_TYPE_FORCE_SIZE
= VG_MAX_ENUM
339 VG_PAINT_TYPE_COLOR
= 0x1B00,
340 VG_PAINT_TYPE_LINEAR_GRADIENT
= 0x1B01,
341 VG_PAINT_TYPE_RADIAL_GRADIENT
= 0x1B02,
342 VG_PAINT_TYPE_PATTERN
= 0x1B03,
344 VG_PAINT_TYPE_FORCE_SIZE
= VG_MAX_ENUM
348 VG_COLOR_RAMP_SPREAD_PAD
= 0x1C00,
349 VG_COLOR_RAMP_SPREAD_REPEAT
= 0x1C01,
350 VG_COLOR_RAMP_SPREAD_REFLECT
= 0x1C02,
352 VG_COLOR_RAMP_SPREAD_MODE_FORCE_SIZE
= VG_MAX_ENUM
353 } VGColorRampSpreadMode
;
356 VG_TILE_FILL
= 0x1D00,
357 VG_TILE_PAD
= 0x1D01,
358 VG_TILE_REPEAT
= 0x1D02,
359 VG_TILE_REFLECT
= 0x1D03,
361 VG_TILING_MODE_FORCE_SIZE
= VG_MAX_ENUM
365 /* RGB{A,X} channel ordering */
368 VG_sRGBA_8888_PRE
= 2,
375 VG_lRGBA_8888_PRE
= 9,
382 /* {A,X}RGB channel ordering */
383 VG_sXRGB_8888
= 0 | (1 << 6),
384 VG_sARGB_8888
= 1 | (1 << 6),
385 VG_sARGB_8888_PRE
= 2 | (1 << 6),
386 VG_sARGB_1555
= 4 | (1 << 6),
387 VG_sARGB_4444
= 5 | (1 << 6),
388 VG_lXRGB_8888
= 7 | (1 << 6),
389 VG_lARGB_8888
= 8 | (1 << 6),
390 VG_lARGB_8888_PRE
= 9 | (1 << 6),
392 /* BGR{A,X} channel ordering */
393 VG_sBGRX_8888
= 0 | (1 << 7),
394 VG_sBGRA_8888
= 1 | (1 << 7),
395 VG_sBGRA_8888_PRE
= 2 | (1 << 7),
396 VG_sBGR_565
= 3 | (1 << 7),
397 VG_sBGRA_5551
= 4 | (1 << 7),
398 VG_sBGRA_4444
= 5 | (1 << 7),
399 VG_lBGRX_8888
= 7 | (1 << 7),
400 VG_lBGRA_8888
= 8 | (1 << 7),
401 VG_lBGRA_8888_PRE
= 9 | (1 << 7),
403 /* {A,X}BGR channel ordering */
404 VG_sXBGR_8888
= 0 | (1 << 6) | (1 << 7),
405 VG_sABGR_8888
= 1 | (1 << 6) | (1 << 7),
406 VG_sABGR_8888_PRE
= 2 | (1 << 6) | (1 << 7),
407 VG_sABGR_1555
= 4 | (1 << 6) | (1 << 7),
408 VG_sABGR_4444
= 5 | (1 << 6) | (1 << 7),
409 VG_lXBGR_8888
= 7 | (1 << 6) | (1 << 7),
410 VG_lABGR_8888
= 8 | (1 << 6) | (1 << 7),
411 VG_lABGR_8888_PRE
= 9 | (1 << 6) | (1 << 7),
413 VG_IMAGE_FORMAT_FORCE_SIZE
= VG_MAX_ENUM
417 VG_IMAGE_QUALITY_NONANTIALIASED
= (1 << 0),
418 VG_IMAGE_QUALITY_FASTER
= (1 << 1),
419 VG_IMAGE_QUALITY_BETTER
= (1 << 2),
421 VG_IMAGE_QUALITY_FORCE_SIZE
= VG_MAX_ENUM
425 VG_IMAGE_FORMAT
= 0x1E00,
426 VG_IMAGE_WIDTH
= 0x1E01,
427 VG_IMAGE_HEIGHT
= 0x1E02,
429 VG_IMAGE_PARAM_TYPE_FORCE_SIZE
= VG_MAX_ENUM
433 VG_DRAW_IMAGE_NORMAL
= 0x1F00,
434 VG_DRAW_IMAGE_MULTIPLY
= 0x1F01,
435 VG_DRAW_IMAGE_STENCIL
= 0x1F02,
437 VG_IMAGE_MODE_FORCE_SIZE
= VG_MAX_ENUM
446 VG_IMAGE_CHANNEL_FORCE_SIZE
= VG_MAX_ENUM
450 VG_BLEND_SRC
= 0x2000,
451 VG_BLEND_SRC_OVER
= 0x2001,
452 VG_BLEND_DST_OVER
= 0x2002,
453 VG_BLEND_SRC_IN
= 0x2003,
454 VG_BLEND_DST_IN
= 0x2004,
455 VG_BLEND_MULTIPLY
= 0x2005,
456 VG_BLEND_SCREEN
= 0x2006,
457 VG_BLEND_DARKEN
= 0x2007,
458 VG_BLEND_LIGHTEN
= 0x2008,
459 VG_BLEND_ADDITIVE
= 0x2009,
461 VG_BLEND_MODE_FORCE_SIZE
= VG_MAX_ENUM
465 VG_FONT_NUM_GLYPHS
= 0x2F00,
467 VG_FONT_PARAM_TYPE_FORCE_SIZE
= VG_MAX_ENUM
471 VG_IMAGE_FORMAT_QUERY
= 0x2100,
472 VG_PATH_DATATYPE_QUERY
= 0x2101,
474 VG_HARDWARE_QUERY_TYPE_FORCE_SIZE
= VG_MAX_ENUM
475 } VGHardwareQueryType
;
478 VG_HARDWARE_ACCELERATED
= 0x2200,
479 VG_HARDWARE_UNACCELERATED
= 0x2201,
481 VG_HARDWARE_QUERY_RESULT_FORCE_SIZE
= VG_MAX_ENUM
482 } VGHardwareQueryResult
;
486 VG_RENDERER
= 0x2301,
488 VG_EXTENSIONS
= 0x2303,
490 VG_STRING_ID_FORCE_SIZE
= VG_MAX_ENUM
493 /* Function Prototypes */
496 # error VG_API_CALL must be defined
500 # error VG_API_ENTRY must be defined
504 # error VG_API_EXIT must be defined
507 VG_API_CALL VGErrorCode VG_API_ENTRY
vgGetError(void) VG_API_EXIT
;
509 VG_API_CALL
void VG_API_ENTRY
vgFlush(void) VG_API_EXIT
;
510 VG_API_CALL
void VG_API_ENTRY
vgFinish(void) VG_API_EXIT
;
512 /* Getters and Setters */
513 VG_API_CALL
void VG_API_ENTRY
vgSetf (VGParamType type
, VGfloat value
) VG_API_EXIT
;
514 VG_API_CALL
void VG_API_ENTRY
vgSeti (VGParamType type
, VGint value
) VG_API_EXIT
;
515 VG_API_CALL
void VG_API_ENTRY
vgSetfv(VGParamType type
, VGint count
,
516 const VGfloat
* values
) VG_API_EXIT
;
517 VG_API_CALL
void VG_API_ENTRY
vgSetiv(VGParamType type
, VGint count
,
518 const VGint
* values
) VG_API_EXIT
;
520 VG_API_CALL VGfloat VG_API_ENTRY
vgGetf(VGParamType type
) VG_API_EXIT
;
521 VG_API_CALL VGint VG_API_ENTRY
vgGeti(VGParamType type
) VG_API_EXIT
;
522 VG_API_CALL VGint VG_API_ENTRY
vgGetVectorSize(VGParamType type
) VG_API_EXIT
;
523 VG_API_CALL
void VG_API_ENTRY
vgGetfv(VGParamType type
, VGint count
, VGfloat
* values
) VG_API_EXIT
;
524 VG_API_CALL
void VG_API_ENTRY
vgGetiv(VGParamType type
, VGint count
, VGint
* values
) VG_API_EXIT
;
526 VG_API_CALL
void VG_API_ENTRY
vgSetParameterf(VGHandle object
,
528 VGfloat value
) VG_API_EXIT
;
529 VG_API_CALL
void VG_API_ENTRY
vgSetParameteri(VGHandle object
,
531 VGint value
) VG_API_EXIT
;
532 VG_API_CALL
void VG_API_ENTRY
vgSetParameterfv(VGHandle object
,
534 VGint count
, const VGfloat
* values
) VG_API_EXIT
;
535 VG_API_CALL
void VG_API_ENTRY
vgSetParameteriv(VGHandle object
,
537 VGint count
, const VGint
* values
) VG_API_EXIT
;
539 VG_API_CALL VGfloat VG_API_ENTRY
vgGetParameterf(VGHandle object
,
540 VGint paramType
) VG_API_EXIT
;
541 VG_API_CALL VGint VG_API_ENTRY
vgGetParameteri(VGHandle object
,
543 VG_API_CALL VGint VG_API_ENTRY
vgGetParameterVectorSize(VGHandle object
,
544 VGint paramType
) VG_API_EXIT
;
545 VG_API_CALL
void VG_API_ENTRY
vgGetParameterfv(VGHandle object
,
547 VGint count
, VGfloat
* values
) VG_API_EXIT
;
548 VG_API_CALL
void VG_API_ENTRY
vgGetParameteriv(VGHandle object
,
550 VGint count
, VGint
* values
) VG_API_EXIT
;
552 /* Matrix Manipulation */
553 VG_API_CALL
void VG_API_ENTRY
vgLoadIdentity(void) VG_API_EXIT
;
554 VG_API_CALL
void VG_API_ENTRY
vgLoadMatrix(const VGfloat
* m
) VG_API_EXIT
;
555 VG_API_CALL
void VG_API_ENTRY
vgGetMatrix(VGfloat
* m
) VG_API_EXIT
;
556 VG_API_CALL
void VG_API_ENTRY
vgMultMatrix(const VGfloat
* m
) VG_API_EXIT
;
557 VG_API_CALL
void VG_API_ENTRY
vgTranslate(VGfloat tx
, VGfloat ty
) VG_API_EXIT
;
558 VG_API_CALL
void VG_API_ENTRY
vgScale(VGfloat sx
, VGfloat sy
) VG_API_EXIT
;
559 VG_API_CALL
void VG_API_ENTRY
vgShear(VGfloat shx
, VGfloat shy
) VG_API_EXIT
;
560 VG_API_CALL
void VG_API_ENTRY
vgRotate(VGfloat angle
) VG_API_EXIT
;
562 /* Masking and Clearing */
563 VG_API_CALL
void VG_API_ENTRY
vgMask(VGHandle mask
, VGMaskOperation operation
,
565 VGint width
, VGint height
) VG_API_EXIT
;
566 VG_API_CALL
void VG_API_ENTRY
vgRenderToMask(VGPath path
,
567 VGbitfield paintModes
,
568 VGMaskOperation operation
) VG_API_EXIT
;
569 VG_API_CALL VGMaskLayer VG_API_ENTRY
vgCreateMaskLayer(VGint width
, VGint height
) VG_API_EXIT
;
570 VG_API_CALL
void VG_API_ENTRY
vgDestroyMaskLayer(VGMaskLayer maskLayer
) VG_API_EXIT
;
571 VG_API_CALL
void VG_API_ENTRY
vgFillMaskLayer(VGMaskLayer maskLayer
,
573 VGint width
, VGint height
,
574 VGfloat value
) VG_API_EXIT
;
575 VG_API_CALL
void VG_API_ENTRY
vgCopyMask(VGMaskLayer maskLayer
,
578 VGint width
, VGint height
) VG_API_EXIT
;
579 VG_API_CALL
void VG_API_ENTRY
vgClear(VGint x
, VGint y
, VGint width
, VGint height
) VG_API_EXIT
;
582 VG_API_CALL VGPath VG_API_ENTRY
vgCreatePath(VGint pathFormat
,
583 VGPathDatatype datatype
,
584 VGfloat scale
, VGfloat bias
,
585 VGint segmentCapacityHint
,
586 VGint coordCapacityHint
,
587 VGbitfield capabilities
) VG_API_EXIT
;
588 VG_API_CALL
void VG_API_ENTRY
vgClearPath(VGPath path
, VGbitfield capabilities
) VG_API_EXIT
;
589 VG_API_CALL
void VG_API_ENTRY
vgDestroyPath(VGPath path
) VG_API_EXIT
;
590 VG_API_CALL
void VG_API_ENTRY
vgRemovePathCapabilities(VGPath path
,
591 VGbitfield capabilities
) VG_API_EXIT
;
592 VG_API_CALL VGbitfield VG_API_ENTRY
vgGetPathCapabilities(VGPath path
) VG_API_EXIT
;
593 VG_API_CALL
void VG_API_ENTRY
vgAppendPath(VGPath dstPath
, VGPath srcPath
) VG_API_EXIT
;
594 VG_API_CALL
void VG_API_ENTRY
vgAppendPathData(VGPath dstPath
,
596 const VGubyte
* pathSegments
,
597 const void * pathData
) VG_API_EXIT
;
598 VG_API_CALL
void VG_API_ENTRY
vgModifyPathCoords(VGPath dstPath
, VGint startIndex
,
600 const void * pathData
) VG_API_EXIT
;
601 VG_API_CALL
void VG_API_ENTRY
vgTransformPath(VGPath dstPath
, VGPath srcPath
) VG_API_EXIT
;
602 VG_API_CALL VGboolean VG_API_ENTRY
vgInterpolatePath(VGPath dstPath
,
605 VGfloat amount
) VG_API_EXIT
;
606 VG_API_CALL VGfloat VG_API_ENTRY
vgPathLength(VGPath path
,
607 VGint startSegment
, VGint numSegments
) VG_API_EXIT
;
608 VG_API_CALL
void VG_API_ENTRY
vgPointAlongPath(VGPath path
,
609 VGint startSegment
, VGint numSegments
,
611 VGfloat
* x
, VGfloat
* y
,
612 VGfloat
* tangentX
, VGfloat
* tangentY
) VG_API_EXIT
;
613 VG_API_CALL
void VG_API_ENTRY
vgPathBounds(VGPath path
,
614 VGfloat
* minX
, VGfloat
* minY
,
615 VGfloat
* width
, VGfloat
* height
) VG_API_EXIT
;
616 VG_API_CALL
void VG_API_ENTRY
vgPathTransformedBounds(VGPath path
,
617 VGfloat
* minX
, VGfloat
* minY
,
618 VGfloat
* width
, VGfloat
* height
) VG_API_EXIT
;
619 VG_API_CALL
void VG_API_ENTRY
vgDrawPath(VGPath path
, VGbitfield paintModes
) VG_API_EXIT
;
622 VG_API_CALL VGPaint VG_API_ENTRY
vgCreatePaint(void) VG_API_EXIT
;
623 VG_API_CALL
void VG_API_ENTRY
vgDestroyPaint(VGPaint paint
) VG_API_EXIT
;
624 VG_API_CALL
void VG_API_ENTRY
vgSetPaint(VGPaint paint
, VGbitfield paintModes
) VG_API_EXIT
;
625 VG_API_CALL VGPaint VG_API_ENTRY
vgGetPaint(VGPaintMode paintMode
) VG_API_EXIT
;
626 VG_API_CALL
void VG_API_ENTRY
vgSetColor(VGPaint paint
, VGuint rgba
) VG_API_EXIT
;
627 VG_API_CALL VGuint VG_API_ENTRY
vgGetColor(VGPaint paint
) VG_API_EXIT
;
628 VG_API_CALL
void VG_API_ENTRY
vgPaintPattern(VGPaint paint
, VGImage pattern
) VG_API_EXIT
;
631 VG_API_CALL VGImage VG_API_ENTRY
vgCreateImage(VGImageFormat format
,
632 VGint width
, VGint height
,
633 VGbitfield allowedQuality
) VG_API_EXIT
;
634 VG_API_CALL
void VG_API_ENTRY
vgDestroyImage(VGImage image
) VG_API_EXIT
;
635 VG_API_CALL
void VG_API_ENTRY
vgClearImage(VGImage image
,
636 VGint x
, VGint y
, VGint width
, VGint height
) VG_API_EXIT
;
637 VG_API_CALL
void VG_API_ENTRY
vgImageSubData(VGImage image
,
638 const void * data
, VGint dataStride
,
639 VGImageFormat dataFormat
,
640 VGint x
, VGint y
, VGint width
, VGint height
) VG_API_EXIT
;
641 VG_API_CALL
void VG_API_ENTRY
vgGetImageSubData(VGImage image
,
642 void * data
, VGint dataStride
,
643 VGImageFormat dataFormat
,
645 VGint width
, VGint height
) VG_API_EXIT
;
646 VG_API_CALL VGImage VG_API_ENTRY
vgChildImage(VGImage parent
,
647 VGint x
, VGint y
, VGint width
, VGint height
) VG_API_EXIT
;
648 VG_API_CALL VGImage VG_API_ENTRY
vgGetParent(VGImage image
) VG_API_EXIT
;
649 VG_API_CALL
void VG_API_ENTRY
vgCopyImage(VGImage dst
, VGint dx
, VGint dy
,
650 VGImage src
, VGint sx
, VGint sy
,
651 VGint width
, VGint height
,
652 VGboolean dither
) VG_API_EXIT
;
653 VG_API_CALL
void VG_API_ENTRY
vgDrawImage(VGImage image
) VG_API_EXIT
;
654 VG_API_CALL
void VG_API_ENTRY
vgSetPixels(VGint dx
, VGint dy
,
655 VGImage src
, VGint sx
, VGint sy
,
656 VGint width
, VGint height
) VG_API_EXIT
;
657 VG_API_CALL
void VG_API_ENTRY
vgWritePixels(const void * data
, VGint dataStride
,
658 VGImageFormat dataFormat
,
660 VGint width
, VGint height
) VG_API_EXIT
;
661 VG_API_CALL
void VG_API_ENTRY
vgGetPixels(VGImage dst
, VGint dx
, VGint dy
,
663 VGint width
, VGint height
) VG_API_EXIT
;
664 VG_API_CALL
void VG_API_ENTRY
vgReadPixels(void * data
, VGint dataStride
,
665 VGImageFormat dataFormat
,
667 VGint width
, VGint height
) VG_API_EXIT
;
668 VG_API_CALL
void VG_API_ENTRY
vgCopyPixels(VGint dx
, VGint dy
,
670 VGint width
, VGint height
) VG_API_EXIT
;
673 VG_API_CALL VGFont VG_API_ENTRY
vgCreateFont(VGint glyphCapacityHint
) VG_API_EXIT
;
674 VG_API_CALL
void VG_API_ENTRY
vgDestroyFont(VGFont font
) VG_API_EXIT
;
675 VG_API_CALL
void VG_API_ENTRY
vgSetGlyphToPath(VGFont font
,
679 const VGfloat glyphOrigin
[2],
680 const VGfloat escapement
[2]) VG_API_EXIT
;
681 VG_API_CALL
void VG_API_ENTRY
vgSetGlyphToImage(VGFont font
,
684 const VGfloat glyphOrigin
[2],
685 const VGfloat escapement
[2]) VG_API_EXIT
;
686 VG_API_CALL
void VG_API_ENTRY
vgClearGlyph(VGFont font
,VGuint glyphIndex
) VG_API_EXIT
;
687 VG_API_CALL
void VG_API_ENTRY
vgDrawGlyph(VGFont font
,
689 VGbitfield paintModes
,
690 VGboolean allowAutoHinting
) VG_API_EXIT
;
691 VG_API_CALL
void VG_API_ENTRY
vgDrawGlyphs(VGFont font
,
693 const VGuint
*glyphIndices
,
694 const VGfloat
*adjustments_x
,
695 const VGfloat
*adjustments_y
,
696 VGbitfield paintModes
,
697 VGboolean allowAutoHinting
) VG_API_EXIT
;
700 VG_API_CALL
void VG_API_ENTRY
vgColorMatrix(VGImage dst
, VGImage src
,
701 const VGfloat
* matrix
) VG_API_EXIT
;
702 VG_API_CALL
void VG_API_ENTRY
vgConvolve(VGImage dst
, VGImage src
,
703 VGint kernelWidth
, VGint kernelHeight
,
704 VGint shiftX
, VGint shiftY
,
705 const VGshort
* kernel
,
708 VGTilingMode tilingMode
) VG_API_EXIT
;
709 VG_API_CALL
void VG_API_ENTRY
vgSeparableConvolve(VGImage dst
, VGImage src
,
712 VGint shiftX
, VGint shiftY
,
713 const VGshort
* kernelX
,
714 const VGshort
* kernelY
,
717 VGTilingMode tilingMode
) VG_API_EXIT
;
718 VG_API_CALL
void VG_API_ENTRY
vgGaussianBlur(VGImage dst
, VGImage src
,
719 VGfloat stdDeviationX
,
720 VGfloat stdDeviationY
,
721 VGTilingMode tilingMode
) VG_API_EXIT
;
722 VG_API_CALL
void VG_API_ENTRY
vgLookup(VGImage dst
, VGImage src
,
723 const VGubyte
* redLUT
,
724 const VGubyte
* greenLUT
,
725 const VGubyte
* blueLUT
,
726 const VGubyte
* alphaLUT
,
727 VGboolean outputLinear
,
728 VGboolean outputPremultiplied
) VG_API_EXIT
;
729 VG_API_CALL
void VG_API_ENTRY
vgLookupSingle(VGImage dst
, VGImage src
,
730 const VGuint
* lookupTable
,
731 VGImageChannel sourceChannel
,
732 VGboolean outputLinear
,
733 VGboolean outputPremultiplied
) VG_API_EXIT
;
735 /* Hardware Queries */
736 VG_API_CALL VGHardwareQueryResult VG_API_ENTRY
vgHardwareQuery(VGHardwareQueryType key
,
737 VGint setting
) VG_API_EXIT
;
739 /* Renderer and Extension Information */
740 VG_API_CALL
const VGubyte
* VG_API_ENTRY
vgGetString(VGStringID name
) VG_API_EXIT
;
746 #endif /* _OPENVG_H */