-/* $Revision: 6822 $ on $Date:: 2008-10-30 05:14:19 -0400 #$ */
+/* $Revision: 9203 $ on $Date:: 2009-10-07 02:21:52 -0700 #$ */
/*------------------------------------------------------------------------
*
- * OpenVG 1.0.1 Reference Implementation
+ * OpenVG 1.1 Reference Implementation
* -------------------------------------
*
* Copyright (c) 2008 The Khronos Group Inc.
*
*//**
* \file
- * \brief OpenVG 1.0.1 API.
+ * \brief OpenVG 1.1 API.
*//*-------------------------------------------------------------------*/
#ifndef _OPENVG_H
#define OPENVG_VERSION_1_0 1
#define OPENVG_VERSION_1_0_1 1
+#define OPENVG_VERSION_1_1 2
#ifndef VG_MAXSHORT
#define VG_MAXSHORT 0x7FFF
#define VG_MAX_ENUM 0x7FFFFFFF
#endif
-typedef long VGHandle;
+typedef VGuint VGHandle;
typedef VGHandle VGPath;
typedef VGHandle VGImage;
+typedef VGHandle VGMaskLayer;
+typedef VGHandle VGFont;
typedef VGHandle VGPaint;
#define VG_INVALID_HANDLE ((VGHandle)0)
/* Scissoring rectangles */
VG_SCISSOR_RECTS = 0x1106,
+ /* Color Transformation */
+ VG_COLOR_TRANSFORM = 0x1170,
+ VG_COLOR_TRANSFORM_VALUES = 0x1171,
+
/* Stroke parameters */
VG_STROKE_LINE_WIDTH = 0x1110,
VG_STROKE_CAP_STYLE = 0x1111,
/* Color for vgClear */
VG_CLEAR_COLOR = 0x1121,
+ /* Glyph origin */
+ VG_GLYPH_ORIGIN = 0x1122,
+
/* Enable/disable alpha masking and scissoring */
VG_MASKING = 0x1130,
VG_SCISSORING = 0x1131,
VG_MATRIX_IMAGE_USER_TO_SURFACE = 0x1401,
VG_MATRIX_FILL_PAINT_TO_USER = 0x1402,
VG_MATRIX_STROKE_PAINT_TO_USER = 0x1403,
+ VG_MATRIX_GLYPH_USER_TO_SURFACE = 0x1404,
VG_MATRIX_MODE_FORCE_SIZE = VG_MAX_ENUM
} VGMatrixMode;
VG_lL_8 = 10,
VG_A_8 = 11,
VG_BW_1 = 12,
+ VG_A_1 = 13,
+ VG_A_4 = 14,
/* {A,X}RGB channel ordering */
VG_sXRGB_8888 = 0 | (1 << 6),
VG_BLEND_MODE_FORCE_SIZE = VG_MAX_ENUM
} VGBlendMode;
+typedef enum {
+ VG_FONT_NUM_GLYPHS = 0x2F00,
+
+ VG_FONT_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
+} VGFontParamType;
+
typedef enum {
VG_IMAGE_FORMAT_QUERY = 0x2100,
VG_PATH_DATATYPE_QUERY = 0x2101,
VG_API_CALL void VG_API_ENTRY vgRotate(VGfloat angle) VG_API_EXIT;
/* Masking and Clearing */
-VG_API_CALL void VG_API_ENTRY vgMask(VGImage mask, VGMaskOperation operation,
- VGint x, VGint y, VGint width, VGint height) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgMask(VGHandle mask, VGMaskOperation operation,
+ VGint x, VGint y,
+ VGint width, VGint height) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgRenderToMask(VGPath path,
+ VGbitfield paintModes,
+ VGMaskOperation operation) VG_API_EXIT;
+VG_API_CALL VGMaskLayer VG_API_ENTRY vgCreateMaskLayer(VGint width, VGint height) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgDestroyMaskLayer(VGMaskLayer maskLayer) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgFillMaskLayer(VGMaskLayer maskLayer,
+ VGint x, VGint y,
+ VGint width, VGint height,
+ VGfloat value) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgCopyMask(VGMaskLayer maskLayer,
+ VGint dx, VGint dy,
+ VGint sx, VGint sy,
+ VGint width, VGint height) VG_API_EXIT;
VG_API_CALL void VG_API_ENTRY vgClear(VGint x, VGint y, VGint width, VGint height) VG_API_EXIT;
/* Paths */
VGint sx, VGint sy,
VGint width, VGint height) VG_API_EXIT;
+/* Text */
+VG_API_CALL VGFont VG_API_ENTRY vgCreateFont(VGint glyphCapacityHint) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgDestroyFont(VGFont font) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgSetGlyphToPath(VGFont font,
+ VGuint glyphIndex,
+ VGPath path,
+ VGboolean isHinted,
+ const VGfloat glyphOrigin [2],
+ const VGfloat escapement[2]) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgSetGlyphToImage(VGFont font,
+ VGuint glyphIndex,
+ VGImage image,
+ const VGfloat glyphOrigin [2],
+ const VGfloat escapement[2]) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgClearGlyph(VGFont font,VGuint glyphIndex) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgDrawGlyph(VGFont font,
+ VGuint glyphIndex,
+ VGbitfield paintModes,
+ VGboolean allowAutoHinting) VG_API_EXIT;
+VG_API_CALL void VG_API_ENTRY vgDrawGlyphs(VGFont font,
+ VGint glyphCount,
+ const VGuint *glyphIndices,
+ const VGfloat *adjustments_x,
+ const VGfloat *adjustments_y,
+ VGbitfield paintModes,
+ VGboolean allowAutoHinting) VG_API_EXIT;
+
/* Image Filters */
VG_API_CALL void VG_API_ENTRY vgColorMatrix(VGImage dst, VGImage src,
const VGfloat * matrix) VG_API_EXIT;
-/* $Revision: 6810 $ on $Date:: 2008-10-29 10:31:37 -0400 #$ */\r
-\r
-/*------------------------------------------------------------------------\r
- * \r
- * VG extensions Reference Implementation\r
- * -------------------------------------\r
- *\r
- * Copyright (c) 2008 The Khronos Group Inc.\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining a\r
- * copy of this software and /or associated documentation files\r
- * (the "Materials "), to deal in the Materials without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Materials,\r
- * and to permit persons to whom the Materials are furnished to do so,\r
- * subject to the following conditions: \r
- *\r
- * The above copyright notice and this permission notice shall be included \r
- * in all copies or substantial portions of the Materials. \r
- *\r
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\r
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\r
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR\r
- * THE USE OR OTHER DEALINGS IN THE MATERIALS.\r
- *\r
- *//**\r
- * \file\r
- * \brief VG extensions\r
- *//*-------------------------------------------------------------------*/\r
-\r
-\r
-\r
-#ifndef _VGEXT_H\r
-#define _VGEXT_H\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-#include <VG/openvg.h>\r
-#include <VG/vgu.h>\r
-\r
-#ifndef VG_API_ENTRYP\r
-# define VG_API_ENTRYP VG_API_ENTRY*\r
-#endif\r
-\r
-#ifndef VGU_API_ENTRYP\r
-# define VGU_API_ENTRYP VGU_API_ENTRY*\r
-#endif\r
-\r
-/*-------------------------------------------------------------------------------\r
- * KHR extensions\r
- *------------------------------------------------------------------------------*/\r
-\r
-typedef enum {\r
-\r
-#ifndef VG_KHR_iterative_average_blur\r
- VG_MAX_AVERAGE_BLUR_DIMENSION_KHR = 0x116B,\r
- VG_AVERAGE_BLUR_DIMENSION_RESOLUTION_KHR = 0x116C,\r
- VG_MAX_AVERAGE_BLUR_ITERATIONS_KHR = 0x116D,\r
-#endif\r
-\r
- VG_PARAM_TYPE_KHR_FORCE_SIZE = VG_MAX_ENUM\r
-} VGParamTypeKHR;\r
-\r
-#ifndef VG_KHR_EGL_image\r
-#define VG_KHR_EGL_image 1\r
-/* VGEGLImageKHR is an opaque handle to an EGLImage */\r
-typedef void* VGeglImageKHR; \r
-\r
-#ifdef VG_VGEXT_PROTOTYPES\r
-VG_API_CALL VGImage VG_API_ENTRY vgCreateEGLImageTargetKHR(VGeglImageKHR image);\r
-#endif\r
-typedef VGImage (VG_API_ENTRYP PFNVGCREATEEGLIMAGETARGETKHRPROC) (VGeglImageKHR image);\r
-\r
-#endif\r
-\r
-\r
-#ifndef VG_KHR_iterative_average_blur\r
-#define VG_KHR_iterative_average_blur 1\r
-\r
-#ifdef VG_VGEXT_PROTOTYPES\r
-VG_API_CALL void vgIterativeAverageBlurKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGTilingMode tilingMode);\r
-#endif \r
-typedef void (VG_API_ENTRYP PFNVGITERATIVEAVERAGEBLURKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGTilingMode tilingMode);\r
-\r
-#endif\r
-\r
-\r
-#ifndef VG_KHR_advanced_blending\r
-#define VG_KHR_advanced_blending 1\r
-\r
-typedef enum {\r
- VG_BLEND_OVERLAY_KHR = 0x2010,\r
- VG_BLEND_HARDLIGHT_KHR = 0x2011,\r
- VG_BLEND_SOFTLIGHT_SVG_KHR = 0x2012,\r
- VG_BLEND_SOFTLIGHT_KHR = 0x2013,\r
- VG_BLEND_COLORDODGE_KHR = 0x2014,\r
- VG_BLEND_COLORBURN_KHR = 0x2015,\r
- VG_BLEND_DIFFERENCE_KHR = 0x2016,\r
- VG_BLEND_SUBTRACT_KHR = 0x2017,\r
- VG_BLEND_INVERT_KHR = 0x2018,\r
- VG_BLEND_EXCLUSION_KHR = 0x2019,\r
- VG_BLEND_LINEARDODGE_KHR = 0x201a,\r
- VG_BLEND_LINEARBURN_KHR = 0x201b,\r
- VG_BLEND_VIVIDLIGHT_KHR = 0x201c,\r
- VG_BLEND_LINEARLIGHT_KHR = 0x201d,\r
- VG_BLEND_PINLIGHT_KHR = 0x201e,\r
- VG_BLEND_HARDMIX_KHR = 0x201f,\r
- VG_BLEND_CLEAR_KHR = 0x2020,\r
- VG_BLEND_DST_KHR = 0x2021,\r
- VG_BLEND_SRC_OUT_KHR = 0x2022,\r
- VG_BLEND_DST_OUT_KHR = 0x2023,\r
- VG_BLEND_SRC_ATOP_KHR = 0x2024,\r
- VG_BLEND_DST_ATOP_KHR = 0x2025,\r
- VG_BLEND_XOR_KHR = 0x2026,\r
-\r
- VG_BLEND_MODE_KHR_FORCE_SIZE= VG_MAX_ENUM\r
-} VGBlendModeKHR;\r
-#endif\r
-\r
-#ifndef VG_KHR_parametric_filter\r
-#define VG_KHR_parametric_filter 1 \r
-\r
-typedef enum {\r
- VG_PF_OBJECT_VISIBLE_FLAG_KHR = (1 << 0),\r
- VG_PF_KNOCKOUT_FLAG_KHR = (1 << 1),\r
- VG_PF_OUTER_FLAG_KHR = (1 << 2),\r
- VG_PF_INNER_FLAG_KHR = (1 << 3),\r
-\r
- VG_PF_TYPE_KHR_FORCE_SIZE = VG_MAX_ENUM\r
-} VGPfTypeKHR;\r
-\r
-typedef enum {\r
- VGU_IMAGE_IN_USE_ERROR = 0xF010,\r
-\r
- VGU_ERROR_CODE_KHR_FORCE_SIZE = VG_MAX_ENUM\r
-} VGUErrorCodeKHR;\r
-\r
-#ifdef VG_VGEXT_PROTOTYPES\r
-VG_API_CALL void VG_API_ENTRY vgParametricFilterKHR(VGImage dst,VGImage src,VGImage blur,VGfloat strength,VGfloat offsetX,VGfloat offsetY,VGbitfield filterFlags,VGPaint highlightPaint,VGPaint shadowPaint);\r
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguDropShadowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint shadowColorRGBA);\r
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGlowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint glowColorRGBA) ;\r
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguBevelKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint highlightColorRGBA,VGuint shadowColorRGBA);\r
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGradientGlowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* glowColorRampStops);\r
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGradientBevelKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* bevelColorRampStops);\r
-#endif\r
-typedef void (VG_API_ENTRYP PFNVGPARAMETRICFILTERKHRPROC) (VGImage dst,VGImage src,VGImage blur,VGfloat strength,VGfloat offsetX,VGfloat offsetY,VGbitfield filterFlags,VGPaint highlightPaint,VGPaint shadowPaint);\r
-typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUDROPSHADOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint shadowColorRGBA);\r
-typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGLOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint glowColorRGBA);\r
-typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUBEVELKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint highlightColorRGBA,VGuint shadowColorRGBA);\r
-typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGRADIENTGLOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* glowColorRampStops);\r
-typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGRADIENTBEVELKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* bevelColorRampStops);\r
-\r
-#endif\r
-\r
-\r
-/*-------------------------------------------------------------------------------\r
- * NDS extensions\r
- *------------------------------------------------------------------------------*/\r
-\r
-#ifndef VG_NDS_paint_generation\r
-#define VG_NDS_paint_generation 1\r
-\r
-typedef enum { \r
- VG_PAINT_COLOR_RAMP_LINEAR_NDS = 0x1A10,\r
- VG_COLOR_MATRIX_NDS = 0x1A11,\r
- VG_PAINT_COLOR_TRANSFORM_LINEAR_NDS = 0x1A12,\r
-\r
- VG_PAINT_PARAM_TYPE_NDS_FORCE_SIZE = VG_MAX_ENUM\r
-} VGPaintParamTypeNds;\r
-\r
-typedef enum {\r
- VG_DRAW_IMAGE_COLOR_MATRIX_NDS = 0x1F10,\r
-\r
- VG_IMAGE_MODE_NDS_FORCE_SIZE = VG_MAX_ENUM\r
-} VGImageModeNds;\r
-#endif \r
-\r
-\r
-#ifndef VG_NDS_projective_geometry\r
-#define VG_NDS_projective_geometry 1\r
-\r
-typedef enum {\r
- VG_CLIP_MODE_NDS = 0x1180,\r
- VG_CLIP_LINES_NDS = 0x1181,\r
- VG_MAX_CLIP_LINES_NDS = 0x1182,\r
-\r
- VG_PARAM_TYPE_NDS_FORCE_SIZE = VG_MAX_ENUM\r
-} VGParamTypeNds;\r
-\r
-typedef enum {\r
- VG_CLIPMODE_NONE_NDS = 0x3000,\r
- VG_CLIPMODE_CLIP_CLOSED_NDS = 0x3001,\r
- VG_CLIPMODE_CLIP_OPEN_NDS = 0x3002,\r
- VG_CLIPMODE_CULL_NDS = 0x3003,\r
-\r
- VG_CLIPMODE_NDS_FORCE_SIZE = VG_MAX_ENUM\r
-} VGClipModeNds;\r
-\r
-typedef enum {\r
- VG_RQUAD_TO_NDS = ( 13 << 1 ),\r
- VG_RCUBIC_TO_NDS = ( 14 << 1 ),\r
- \r
- VG_PATH_SEGMENT_NDS_FORCE_SIZE = VG_MAX_ENUM\r
-} VGPathSegmentNds;\r
-\r
-typedef enum {\r
- VG_RQUAD_TO_ABS_NDS = (VG_RQUAD_TO_NDS | VG_ABSOLUTE),\r
- VG_RQUAD_TO_REL_NDS = (VG_RQUAD_TO_NDS | VG_RELATIVE),\r
- VG_RCUBIC_TO_ABS_NDS = (VG_RCUBIC_TO_NDS | VG_ABSOLUTE),\r
- VG_RCUBIC_TO_REL_NDS = (VG_RCUBIC_TO_NDS | VG_RELATIVE),\r
-\r
- VG_PATH_COMMAND_NDS_FORCE_SIZE = VG_MAX_ENUM\r
-} VGPathCommandNds;\r
-\r
-#ifdef VG_VGEXT_PROTOTYPES\r
-VG_API_CALL void VG_API_ENTRY vgProjectiveMatrixNDS(VGboolean enable) ;\r
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguTransformClipLineNDS(const VGfloat Ain,const VGfloat Bin,const VGfloat Cin,const VGfloat* matrix,const VGboolean inverse,VGfloat* Aout,VGfloat* Bout,VGfloat* Cout);\r
-#endif \r
-typedef void (VG_API_ENTRYP PFNVGPROJECTIVEMATRIXNDSPROC) (VGboolean enable) ;\r
-typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUTRANSFORMCLIPLINENDSPROC) (const VGfloat Ain,const VGfloat Bin,const VGfloat Cin,const VGfloat* matrix,const VGboolean inverse,VGfloat* Aout,VGfloat* Bout,VGfloat* Cout);\r
-\r
-#endif\r
-\r
-#ifdef __cplusplus \r
-} /* extern "C" */\r
-#endif\r
-\r
-#endif /* _VGEXT_H */\r
+/* $Revision: 6810 $ on $Date:: 2008-10-29 07:31:37 -0700 #$ */
+
+/*------------------------------------------------------------------------
+ *
+ * VG extensions Reference Implementation
+ * -------------------------------------
+ *
+ * Copyright (c) 2008 The Khronos Group Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and /or associated documentation files
+ * (the "Materials "), to deal in the Materials without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Materials,
+ * and to permit persons to whom the Materials are furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Materials.
+ *
+ * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
+ * THE USE OR OTHER DEALINGS IN THE MATERIALS.
+ *
+ *//**
+ * \file
+ * \brief VG extensions
+ *//*-------------------------------------------------------------------*/
+
+
+
+#ifndef _VGEXT_H
+#define _VGEXT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <VG/openvg.h>
+#include <VG/vgu.h>
+
+#ifndef VG_API_ENTRYP
+# define VG_API_ENTRYP VG_API_ENTRY*
+#endif
+
+#ifndef VGU_API_ENTRYP
+# define VGU_API_ENTRYP VGU_API_ENTRY*
+#endif
+
+/*-------------------------------------------------------------------------------
+ * KHR extensions
+ *------------------------------------------------------------------------------*/
+
+typedef enum {
+
+#ifndef VG_KHR_iterative_average_blur
+ VG_MAX_AVERAGE_BLUR_DIMENSION_KHR = 0x116B,
+ VG_AVERAGE_BLUR_DIMENSION_RESOLUTION_KHR = 0x116C,
+ VG_MAX_AVERAGE_BLUR_ITERATIONS_KHR = 0x116D,
+#endif
+
+ VG_PARAM_TYPE_KHR_FORCE_SIZE = VG_MAX_ENUM
+} VGParamTypeKHR;
+
+#ifndef VG_KHR_EGL_image
+#define VG_KHR_EGL_image 1
+/* VGEGLImageKHR is an opaque handle to an EGLImage */
+typedef void* VGeglImageKHR;
+
+#ifdef VG_VGEXT_PROTOTYPES
+VG_API_CALL VGImage VG_API_ENTRY vgCreateEGLImageTargetKHR(VGeglImageKHR image);
+#endif
+typedef VGImage (VG_API_ENTRYP PFNVGCREATEEGLIMAGETARGETKHRPROC) (VGeglImageKHR image);
+
+#endif
+
+
+#ifndef VG_KHR_iterative_average_blur
+#define VG_KHR_iterative_average_blur 1
+
+#ifdef VG_VGEXT_PROTOTYPES
+VG_API_CALL void vgIterativeAverageBlurKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGTilingMode tilingMode);
+#endif
+typedef void (VG_API_ENTRYP PFNVGITERATIVEAVERAGEBLURKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGTilingMode tilingMode);
+
+#endif
+
+
+#ifndef VG_KHR_advanced_blending
+#define VG_KHR_advanced_blending 1
+
+typedef enum {
+ VG_BLEND_OVERLAY_KHR = 0x2010,
+ VG_BLEND_HARDLIGHT_KHR = 0x2011,
+ VG_BLEND_SOFTLIGHT_SVG_KHR = 0x2012,
+ VG_BLEND_SOFTLIGHT_KHR = 0x2013,
+ VG_BLEND_COLORDODGE_KHR = 0x2014,
+ VG_BLEND_COLORBURN_KHR = 0x2015,
+ VG_BLEND_DIFFERENCE_KHR = 0x2016,
+ VG_BLEND_SUBTRACT_KHR = 0x2017,
+ VG_BLEND_INVERT_KHR = 0x2018,
+ VG_BLEND_EXCLUSION_KHR = 0x2019,
+ VG_BLEND_LINEARDODGE_KHR = 0x201a,
+ VG_BLEND_LINEARBURN_KHR = 0x201b,
+ VG_BLEND_VIVIDLIGHT_KHR = 0x201c,
+ VG_BLEND_LINEARLIGHT_KHR = 0x201d,
+ VG_BLEND_PINLIGHT_KHR = 0x201e,
+ VG_BLEND_HARDMIX_KHR = 0x201f,
+ VG_BLEND_CLEAR_KHR = 0x2020,
+ VG_BLEND_DST_KHR = 0x2021,
+ VG_BLEND_SRC_OUT_KHR = 0x2022,
+ VG_BLEND_DST_OUT_KHR = 0x2023,
+ VG_BLEND_SRC_ATOP_KHR = 0x2024,
+ VG_BLEND_DST_ATOP_KHR = 0x2025,
+ VG_BLEND_XOR_KHR = 0x2026,
+
+ VG_BLEND_MODE_KHR_FORCE_SIZE= VG_MAX_ENUM
+} VGBlendModeKHR;
+#endif
+
+#ifndef VG_KHR_parametric_filter
+#define VG_KHR_parametric_filter 1
+
+typedef enum {
+ VG_PF_OBJECT_VISIBLE_FLAG_KHR = (1 << 0),
+ VG_PF_KNOCKOUT_FLAG_KHR = (1 << 1),
+ VG_PF_OUTER_FLAG_KHR = (1 << 2),
+ VG_PF_INNER_FLAG_KHR = (1 << 3),
+
+ VG_PF_TYPE_KHR_FORCE_SIZE = VG_MAX_ENUM
+} VGPfTypeKHR;
+
+typedef enum {
+ VGU_IMAGE_IN_USE_ERROR = 0xF010,
+
+ VGU_ERROR_CODE_KHR_FORCE_SIZE = VG_MAX_ENUM
+} VGUErrorCodeKHR;
+
+#ifdef VG_VGEXT_PROTOTYPES
+VG_API_CALL void VG_API_ENTRY vgParametricFilterKHR(VGImage dst,VGImage src,VGImage blur,VGfloat strength,VGfloat offsetX,VGfloat offsetY,VGbitfield filterFlags,VGPaint highlightPaint,VGPaint shadowPaint);
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguDropShadowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint shadowColorRGBA);
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGlowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint glowColorRGBA) ;
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguBevelKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint highlightColorRGBA,VGuint shadowColorRGBA);
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGradientGlowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* glowColorRampStops);
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGradientBevelKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* bevelColorRampStops);
+#endif
+typedef void (VG_API_ENTRYP PFNVGPARAMETRICFILTERKHRPROC) (VGImage dst,VGImage src,VGImage blur,VGfloat strength,VGfloat offsetX,VGfloat offsetY,VGbitfield filterFlags,VGPaint highlightPaint,VGPaint shadowPaint);
+typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUDROPSHADOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint shadowColorRGBA);
+typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGLOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint glowColorRGBA);
+typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUBEVELKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint highlightColorRGBA,VGuint shadowColorRGBA);
+typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGRADIENTGLOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* glowColorRampStops);
+typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGRADIENTBEVELKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* bevelColorRampStops);
+
+#endif
+
+
+/*-------------------------------------------------------------------------------
+ * NDS extensions
+ *------------------------------------------------------------------------------*/
+
+#ifndef VG_NDS_paint_generation
+#define VG_NDS_paint_generation 1
+
+typedef enum {
+ VG_PAINT_COLOR_RAMP_LINEAR_NDS = 0x1A10,
+ VG_COLOR_MATRIX_NDS = 0x1A11,
+ VG_PAINT_COLOR_TRANSFORM_LINEAR_NDS = 0x1A12,
+
+ VG_PAINT_PARAM_TYPE_NDS_FORCE_SIZE = VG_MAX_ENUM
+} VGPaintParamTypeNds;
+
+typedef enum {
+ VG_DRAW_IMAGE_COLOR_MATRIX_NDS = 0x1F10,
+
+ VG_IMAGE_MODE_NDS_FORCE_SIZE = VG_MAX_ENUM
+} VGImageModeNds;
+#endif
+
+
+#ifndef VG_NDS_projective_geometry
+#define VG_NDS_projective_geometry 1
+
+typedef enum {
+ VG_CLIP_MODE_NDS = 0x1180,
+ VG_CLIP_LINES_NDS = 0x1181,
+ VG_MAX_CLIP_LINES_NDS = 0x1182,
+
+ VG_PARAM_TYPE_NDS_FORCE_SIZE = VG_MAX_ENUM
+} VGParamTypeNds;
+
+typedef enum {
+ VG_CLIPMODE_NONE_NDS = 0x3000,
+ VG_CLIPMODE_CLIP_CLOSED_NDS = 0x3001,
+ VG_CLIPMODE_CLIP_OPEN_NDS = 0x3002,
+ VG_CLIPMODE_CULL_NDS = 0x3003,
+
+ VG_CLIPMODE_NDS_FORCE_SIZE = VG_MAX_ENUM
+} VGClipModeNds;
+
+typedef enum {
+ VG_RQUAD_TO_NDS = ( 13 << 1 ),
+ VG_RCUBIC_TO_NDS = ( 14 << 1 ),
+
+ VG_PATH_SEGMENT_NDS_FORCE_SIZE = VG_MAX_ENUM
+} VGPathSegmentNds;
+
+typedef enum {
+ VG_RQUAD_TO_ABS_NDS = (VG_RQUAD_TO_NDS | VG_ABSOLUTE),
+ VG_RQUAD_TO_REL_NDS = (VG_RQUAD_TO_NDS | VG_RELATIVE),
+ VG_RCUBIC_TO_ABS_NDS = (VG_RCUBIC_TO_NDS | VG_ABSOLUTE),
+ VG_RCUBIC_TO_REL_NDS = (VG_RCUBIC_TO_NDS | VG_RELATIVE),
+
+ VG_PATH_COMMAND_NDS_FORCE_SIZE = VG_MAX_ENUM
+} VGPathCommandNds;
+
+#ifdef VG_VGEXT_PROTOTYPES
+VG_API_CALL void VG_API_ENTRY vgProjectiveMatrixNDS(VGboolean enable) ;
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguTransformClipLineNDS(const VGfloat Ain,const VGfloat Bin,const VGfloat Cin,const VGfloat* matrix,const VGboolean inverse,VGfloat* Aout,VGfloat* Bout,VGfloat* Cout);
+#endif
+typedef void (VG_API_ENTRYP PFNVGPROJECTIVEMATRIXNDSPROC) (VGboolean enable) ;
+typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUTRANSFORMCLIPLINENDSPROC) (const VGfloat Ain,const VGfloat Bin,const VGfloat Cin,const VGfloat* matrix,const VGboolean inverse,VGfloat* Aout,VGfloat* Bout,VGfloat* Cout);
+
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* _VGEXT_H */
-/* $Revision: 6810 $ on $Date:: 2008-10-29 10:31:37 -0400 #$ */\r
-\r
-/*------------------------------------------------------------------------\r
- *\r
- * VG platform specific header Reference Implementation\r
- * ----------------------------------------------------\r
- *\r
- * Copyright (c) 2008 The Khronos Group Inc.\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining a\r
- * copy of this software and /or associated documentation files\r
- * (the "Materials "), to deal in the Materials without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Materials,\r
- * and to permit persons to whom the Materials are furnished to do so,\r
- * subject to the following conditions: \r
- *\r
- * The above copyright notice and this permission notice shall be included \r
- * in all copies or substantial portions of the Materials. \r
- *\r
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\r
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\r
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR\r
- * THE USE OR OTHER DEALINGS IN THE MATERIALS.\r
- *\r
- *//**\r
- * \file\r
- * \brief VG platform specific header\r
- *//*-------------------------------------------------------------------*/\r
-\r
-#ifndef _VGPLATFORM_H\r
-#define _VGPLATFORM_H\r
-\r
-#include <KHR/khrplatform.h>\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-#ifndef VG_API_CALL \r
-#if defined(OPENVG_STATIC_LIBRARY)\r
-# define VG_API_CALL\r
-#else\r
-# define VG_API_CALL KHRONOS_APICALL\r
-#endif /* defined OPENVG_STATIC_LIBRARY */\r
-#endif /* ifndef VG_API_CALL */\r
-\r
-#ifndef VGU_API_CALL \r
-#if defined(OPENVG_STATIC_LIBRARY)\r
-# define VGU_API_CALL\r
-#else\r
-# define VGU_API_CALL KHRONOS_APICALL\r
-#endif /* defined OPENVG_STATIC_LIBRARY */\r
-#endif /* ifndef VGU_API_CALL */\r
-\r
-\r
-#ifndef VG_API_ENTRY\r
-#define VG_API_ENTRY\r
-#endif\r
-\r
-#ifndef VG_API_EXIT\r
-#define VG_API_EXIT\r
-#endif\r
-\r
-#ifndef VGU_API_ENTRY\r
-#define VGU_API_ENTRY\r
-#endif\r
-\r
-#ifndef VGU_API_EXIT\r
-#define VGU_API_EXIT\r
-#endif\r
-\r
-typedef float VGfloat;\r
-typedef signed char VGbyte;\r
-typedef unsigned char VGubyte;\r
-typedef signed short VGshort;\r
-typedef signed int VGint;\r
-typedef unsigned int VGuint;\r
-typedef unsigned int VGbitfield;\r
-\r
-#ifndef VG_VGEXT_PROTOTYPES\r
-#define VG_VGEXT_PROTOTYPES\r
-#endif \r
-\r
-#ifdef __cplusplus \r
-} /* extern "C" */\r
-#endif\r
-\r
-#endif /* _VGPLATFORM_H */\r
+/* $Revision: 6810 $ on $Date:: 2008-10-29 07:31:37 -0700 #$ */
+
+/*------------------------------------------------------------------------
+ *
+ * VG platform specific header Reference Implementation
+ * ----------------------------------------------------
+ *
+ * Copyright (c) 2008 The Khronos Group Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and /or associated documentation files
+ * (the "Materials "), to deal in the Materials without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Materials,
+ * and to permit persons to whom the Materials are furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Materials.
+ *
+ * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
+ * THE USE OR OTHER DEALINGS IN THE MATERIALS.
+ *
+ *//**
+ * \file
+ * \brief VG platform specific header
+ *//*-------------------------------------------------------------------*/
+
+#ifndef _VGPLATFORM_H
+#define _VGPLATFORM_H
+
+#include <KHR/khrplatform.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef VG_API_CALL
+#if defined(OPENVG_STATIC_LIBRARY)
+# define VG_API_CALL
+#else
+# define VG_API_CALL KHRONOS_APICALL
+#endif /* defined OPENVG_STATIC_LIBRARY */
+#endif /* ifndef VG_API_CALL */
+
+#ifndef VGU_API_CALL
+#if defined(OPENVG_STATIC_LIBRARY)
+# define VGU_API_CALL
+#else
+# define VGU_API_CALL KHRONOS_APICALL
+#endif /* defined OPENVG_STATIC_LIBRARY */
+#endif /* ifndef VGU_API_CALL */
+
+
+#ifndef VG_API_ENTRY
+#define VG_API_ENTRY
+#endif
+
+#ifndef VG_API_EXIT
+#define VG_API_EXIT
+#endif
+
+#ifndef VGU_API_ENTRY
+#define VGU_API_ENTRY
+#endif
+
+#ifndef VGU_API_EXIT
+#define VGU_API_EXIT
+#endif
+
+typedef float VGfloat;
+typedef signed char VGbyte;
+typedef unsigned char VGubyte;
+typedef signed short VGshort;
+typedef signed int VGint;
+typedef unsigned int VGuint;
+typedef unsigned int VGbitfield;
+
+#ifndef VG_VGEXT_PROTOTYPES
+#define VG_VGEXT_PROTOTYPES
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* _VGPLATFORM_H */
-/* $Revision: 6810 $ on $Date:: 2008-10-29 10:31:37 -0400 #$ */\r
-\r
-/*------------------------------------------------------------------------\r
- * \r
- * VGU 1.0.1 Reference Implementation\r
- * -------------------------------------\r
- *\r
- * Copyright (c) 2008 The Khronos Group Inc.\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining a\r
- * copy of this software and /or associated documentation files\r
- * (the "Materials "), to deal in the Materials without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Materials,\r
- * and to permit persons to whom the Materials are furnished to do so,\r
- * subject to the following conditions: \r
- *\r
- * The above copyright notice and this permission notice shall be included \r
- * in all copies or substantial portions of the Materials. \r
- *\r
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\r
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\r
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR\r
- * THE USE OR OTHER DEALINGS IN THE MATERIALS.\r
- *\r
- *//**\r
- * \file\r
- * \brief VGU 1.0.1 API.\r
- *//*-------------------------------------------------------------------*/\r
-\r
-#ifndef _VGU_H\r
-#define _VGU_H\r
-\r
-#ifdef __cplusplus \r
-extern "C" { \r
-#endif\r
-\r
-#include <VG/openvg.h>\r
-\r
-#define VGU_VERSION_1_0 1\r
-\r
-#ifndef VGU_API_CALL\r
-# error VGU_API_CALL must be defined\r
-#endif\r
-\r
-#ifndef VGU_API_ENTRY\r
-# error VGU_API_ENTRY must be defined \r
-#endif\r
-\r
-#ifndef VGU_API_EXIT\r
-# error VGU_API_EXIT must be defined \r
-#endif\r
-\r
-\r
-typedef enum {\r
- VGU_NO_ERROR = 0,\r
- VGU_BAD_HANDLE_ERROR = 0xF000,\r
- VGU_ILLEGAL_ARGUMENT_ERROR = 0xF001,\r
- VGU_OUT_OF_MEMORY_ERROR = 0xF002,\r
- VGU_PATH_CAPABILITY_ERROR = 0xF003,\r
- VGU_BAD_WARP_ERROR = 0xF004,\r
-\r
- VGU_ERROR_CODE_FORCE_SIZE = VG_MAX_ENUM\r
-} VGUErrorCode;\r
-\r
-typedef enum {\r
- VGU_ARC_OPEN = 0xF100,\r
- VGU_ARC_CHORD = 0xF101,\r
- VGU_ARC_PIE = 0xF102,\r
-\r
- VGU_ARC_TYPE_FORCE_SIZE = VG_MAX_ENUM\r
-} VGUArcType;\r
-\r
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguLine(VGPath path,\r
- VGfloat x0, VGfloat y0,\r
- VGfloat x1, VGfloat y1) VGU_API_EXIT;\r
-\r
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguPolygon(VGPath path,\r
- const VGfloat * points, VGint count,\r
- VGboolean closed) VGU_API_EXIT;\r
-\r
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguRect(VGPath path,\r
- VGfloat x, VGfloat y,\r
- VGfloat width, VGfloat height) VGU_API_EXIT;\r
-\r
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguRoundRect(VGPath path,\r
- VGfloat x, VGfloat y,\r
- VGfloat width, VGfloat height,\r
- VGfloat arcWidth, VGfloat arcHeight) VGU_API_EXIT;\r
-\r
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguEllipse(VGPath path,\r
- VGfloat cx, VGfloat cy,\r
- VGfloat width, VGfloat height) VGU_API_EXIT;\r
-\r
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguArc(VGPath path,\r
- VGfloat x, VGfloat y,\r
- VGfloat width, VGfloat height,\r
- VGfloat startAngle, VGfloat angleExtent,\r
- VGUArcType arcType) VGU_API_EXIT;\r
-\r
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpQuadToSquare(VGfloat sx0, VGfloat sy0,\r
- VGfloat sx1, VGfloat sy1,\r
- VGfloat sx2, VGfloat sy2,\r
- VGfloat sx3, VGfloat sy3,\r
- VGfloat * matrix) VGU_API_EXIT;\r
-\r
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpSquareToQuad(VGfloat dx0, VGfloat dy0,\r
- VGfloat dx1, VGfloat dy1,\r
- VGfloat dx2, VGfloat dy2,\r
- VGfloat dx3, VGfloat dy3,\r
- VGfloat * matrix) VGU_API_EXIT;\r
-\r
-VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpQuadToQuad(VGfloat dx0, VGfloat dy0,\r
- VGfloat dx1, VGfloat dy1,\r
- VGfloat dx2, VGfloat dy2,\r
- VGfloat dx3, VGfloat dy3,\r
- VGfloat sx0, VGfloat sy0,\r
- VGfloat sx1, VGfloat sy1,\r
- VGfloat sx2, VGfloat sy2,\r
- VGfloat sx3, VGfloat sy3,\r
- VGfloat * matrix) VGU_API_EXIT;\r
-\r
-#ifdef __cplusplus \r
-} /* extern "C" */\r
-#endif\r
-\r
-#endif /* #ifndef _VGU_H */\r
+/* $Revision: 6810 $ on $Date:: 2008-10-29 07:31:37 -0700 #$ */
+
+/*------------------------------------------------------------------------
+ *
+ * VGU 1.1 Reference Implementation
+ * -------------------------------------
+ *
+ * Copyright (c) 2008 The Khronos Group Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and /or associated documentation files
+ * (the "Materials "), to deal in the Materials without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Materials,
+ * and to permit persons to whom the Materials are furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Materials.
+ *
+ * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
+ * THE USE OR OTHER DEALINGS IN THE MATERIALS.
+ *
+ *//**
+ * \file
+ * \brief VGU 1.1 API.
+ *//*-------------------------------------------------------------------*/
+
+#ifndef _VGU_H
+#define _VGU_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <VG/openvg.h>
+
+#define VGU_VERSION_1_0 1
+#define VGU_VERSION_1_1 2
+
+#ifndef VGU_API_CALL
+# error VGU_API_CALL must be defined
+#endif
+
+#ifndef VGU_API_ENTRY
+# error VGU_API_ENTRY must be defined
+#endif
+
+#ifndef VGU_API_EXIT
+# error VGU_API_EXIT must be defined
+#endif
+
+
+typedef enum {
+ VGU_NO_ERROR = 0,
+ VGU_BAD_HANDLE_ERROR = 0xF000,
+ VGU_ILLEGAL_ARGUMENT_ERROR = 0xF001,
+ VGU_OUT_OF_MEMORY_ERROR = 0xF002,
+ VGU_PATH_CAPABILITY_ERROR = 0xF003,
+ VGU_BAD_WARP_ERROR = 0xF004,
+
+ VGU_ERROR_CODE_FORCE_SIZE = VG_MAX_ENUM
+} VGUErrorCode;
+
+typedef enum {
+ VGU_ARC_OPEN = 0xF100,
+ VGU_ARC_CHORD = 0xF101,
+ VGU_ARC_PIE = 0xF102,
+
+ VGU_ARC_TYPE_FORCE_SIZE = VG_MAX_ENUM
+} VGUArcType;
+
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguLine(VGPath path,
+ VGfloat x0, VGfloat y0,
+ VGfloat x1, VGfloat y1) VGU_API_EXIT;
+
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguPolygon(VGPath path,
+ const VGfloat * points, VGint count,
+ VGboolean closed) VGU_API_EXIT;
+
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguRect(VGPath path,
+ VGfloat x, VGfloat y,
+ VGfloat width, VGfloat height) VGU_API_EXIT;
+
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguRoundRect(VGPath path,
+ VGfloat x, VGfloat y,
+ VGfloat width, VGfloat height,
+ VGfloat arcWidth, VGfloat arcHeight) VGU_API_EXIT;
+
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguEllipse(VGPath path,
+ VGfloat cx, VGfloat cy,
+ VGfloat width, VGfloat height) VGU_API_EXIT;
+
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguArc(VGPath path,
+ VGfloat x, VGfloat y,
+ VGfloat width, VGfloat height,
+ VGfloat startAngle, VGfloat angleExtent,
+ VGUArcType arcType) VGU_API_EXIT;
+
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpQuadToSquare(VGfloat sx0, VGfloat sy0,
+ VGfloat sx1, VGfloat sy1,
+ VGfloat sx2, VGfloat sy2,
+ VGfloat sx3, VGfloat sy3,
+ VGfloat * matrix) VGU_API_EXIT;
+
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpSquareToQuad(VGfloat dx0, VGfloat dy0,
+ VGfloat dx1, VGfloat dy1,
+ VGfloat dx2, VGfloat dy2,
+ VGfloat dx3, VGfloat dy3,
+ VGfloat * matrix) VGU_API_EXIT;
+
+VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpQuadToQuad(VGfloat dx0, VGfloat dy0,
+ VGfloat dx1, VGfloat dy1,
+ VGfloat dx2, VGfloat dy2,
+ VGfloat dx3, VGfloat dy3,
+ VGfloat sx0, VGfloat sy0,
+ VGfloat sx1, VGfloat sy1,
+ VGfloat sx2, VGfloat sy2,
+ VGfloat sx3, VGfloat sy3,
+ VGfloat * matrix) VGU_API_EXIT;
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* #ifndef _VGU_H */
#include "VG/openvg.h"
#include "vg_context.h"
+#include "api.h"
#include "util/u_memory.h"
VGuint glyphIndex,
VGPath path,
VGboolean isHinted,
- VGfloat glyphOrigin [2],
- VGfloat escapement[2])
+ const VGfloat glyphOrigin[2],
+ const VGfloat escapement[2])
{
struct vg_context *ctx = vg_current_context();
struct vg_object *pathObj;
void vegaSetGlyphToImage(VGFont font,
VGuint glyphIndex,
VGImage image,
- VGfloat glyphOrigin [2],
- VGfloat escapement[2])
+ const VGfloat glyphOrigin[2],
+ const VGfloat escapement[2])
{
struct vg_context *ctx = vg_current_context();
struct vg_object *img_obj;
void vegaDrawGlyphs(VGFont font,
VGint glyphCount,
- VGuint *glyphIndices,
- VGfloat *adjustments_x,
- VGfloat *adjustments_y,
+ const VGuint *glyphIndices,
+ const VGfloat *adjustments_x,
+ const VGfloat *adjustments_y,
VGbitfield paintModes,
VGboolean allowAutoHinting)
{
#include "util/u_inlines.h"
#include "util/u_format.h"
#include "util/u_memory.h"
+#include "util/u_sampler.h"
struct vg_mask_layer {
struct vg_object base;
pt.height0 = height;
pt.depth0 = 1;
pt.bind = PIPE_BIND_SAMPLER_VIEW;
- pt.compressed = 0;
texture = screen->resource_create(screen, &pt);
struct vg_context *ctx = vg_current_context();
vg_context_remove_object(ctx, VG_OBJECT_MASK, layer);
- pipe_resource_release(&layer->texture);
+ pipe_sampler_view_reference(&layer->sampler_view, NULL);
FREE(layer);
}
void, WritePixels, const void *data, VGint dataStride, VGImageFormat dataFormat, VGint dx, VGint dy, VGint width, VGint height
## OpenVG 1.1
-#void, ClearGlyph, VGFont font,VGuint glyphIndex
-#void, CopyMask, VGMaskLayer maskLayer, VGint dx, VGint dy, VGint sx, VGint sy, VGint width, VGint height
-#VGFont, CreateFont, VGint glyphCapacityHint
-#VGMaskLayer, CreateMaskLayer, VGint width, VGint height
-#void, DestroyFont, VGFont font
-#void, DestroyMaskLayer, VGMaskLayer maskLayer
-#void, DrawGlyph, VGFont font, VGuint glyphIndex, VGbitfield paintModes, VGboolean allowAutoHinting
-#void, DrawGlyphs, VGFont font, VGint glyphCount, const VGuint *glyphIndices, const VGfloat *adjustments_x, const VGfloat *adjustments_y, VGbitfield paintModes, VGboolean allowAutoHinting
-#void, FillMaskLayer, VGMaskLayer maskLayer, VGint x, VGint y, VGint width, VGint height, VGfloat value
-#void, RenderToMask, VGPath path, VGbitfield paintModes, VGMaskOperation operation
-#void, SetGlyphToImage, VGFont font, VGuint glyphIndex, VGImage image, const VGfloat glyphOrigin[2], const VGfloat escapement[2]
-#void, SetGlyphToPath, VGFont font, VGuint glyphIndex, VGPath path, VGboolean isHinted, const VGfloat glyphOrigin[2], const VGfloat escapement[2]
+void, ClearGlyph, VGFont font, VGuint glyphIndex
+void, CopyMask, VGMaskLayer maskLayer, VGint dx, VGint dy, VGint sx, VGint sy, VGint width, VGint height
+VGFont, CreateFont, VGint glyphCapacityHint
+VGMaskLayer, CreateMaskLayer, VGint width, VGint height
+void, DestroyFont, VGFont font
+void, DestroyMaskLayer, VGMaskLayer maskLayer
+void, DrawGlyph, VGFont font, VGuint glyphIndex, VGbitfield paintModes, VGboolean allowAutoHinting
+void, DrawGlyphs, VGFont font, VGint glyphCount, const VGuint *glyphIndices, const VGfloat *adjustments_x, const VGfloat *adjustments_y, VGbitfield paintModes, VGboolean allowAutoHinting
+void, FillMaskLayer, VGMaskLayer maskLayer, VGint x, VGint y, VGint width, VGint height, VGfloat value
+void, RenderToMask, VGPath path, VGbitfield paintModes, VGMaskOperation operation
+void, SetGlyphToImage, VGFont font, VGuint glyphIndex, VGImage image, const VGfloat glyphOrigin[2], const VGfloat escapement[2]
+void, SetGlyphToPath, VGFont font, VGuint glyphIndex, VGPath path, VGboolean isHinted, const VGfloat glyphOrigin[2], const VGfloat escapement[2]