# display_vgu.h
## 概述
该文件定义2D矢量硬件加速模块相关驱动函数。
**Since:**
3.0
**相关模块:**
[Display](_display.md)
## 汇总
### 类
| 名称 | 描述 |
| -------- | -------- |
| [VGUPoint](_v_g_u_point.md) | struct
坐标点对象。 |
| [VGURect](_v_g_u_rect.md) | struct
矩形对象。 |
| [VGUPath](_v_g_u_path.md) | struct
路径对象,存放路径命令和坐标数据。 |
| [VGUMatrix3](_v_g_u_matrix3.md) | struct
变换矩阵。 |
| [VGUBuffer](_v_g_u_buffer.md) | struct
硬件加速渲染位图缓存。 |
| [VGUMaskLayer](_v_g_u_mask_layer.md) | struct
定义蒙版图层。 |
| [VGUSurface](_v_g_u_surface.md) | struct
2D硬件加速绘制目标表面。 |
| [VGUColorStop](_v_g_u_color_stop.md) | struct
渐变颜色分布位置。 |
| [VGULinear](_v_g_u_linear.md) | struct
线性渐变。 |
| [VGURadial](_v_g_u_radial.md) | struct
辐射渐变。 |
| [VGUConic](_v_g_u_conic.md) | struct
圆锥渐变。 |
| [VGUImage](_v_g_u_image.md) | struct
图像对象。 |
| [VGUPattern](_v_g_u_pattern.md) | struct
图片模式对象。 |
| [VGUGradient](_v_g_u_gradient.md) | struct
渐变对象。 |
| [VGUSolid](_v_g_u_solid.md) | struct
颜色对象 |
| [VGUPaintStyle](_v_g_u_paint_style.md) | struct
填充或描边路径的渲染风格。 |
| [VGUFillAttr](_v_g_u_fill_attr.md) | struct
填充路径的属性。 |
| [VGUStrokeAttr](_v_g_u_stroke_attr.md) | struct
描边路径的属性。 |
| [VGUFuncs](_v_g_u_funcs.md) | struct
定义2D硬件加速驱动函数。 |
### 宏定义
| 名称 | 描述 |
| -------- | -------- |
| [HDI_VGU_SCALAR_IS_FLOAT](_display.md#hdi_vgu_scalar_is_float) 1 | VGU标量是否为浮点型。 |
### 类型定义
| 名称 | 描述 |
| -------- | -------- |
| [VGUScalar](_display.md#vguscalar) | typedef float
VGU标量 |
| [VGUPixelFormat](_display.md#vgupixelformat) | typedef [PixelFormat](_display.md#pixelformat)
像素格式 |
| [VGUBlendType](_display.md#vgublendtype) | typedef [BlendType](_display.md#blendtype)
混合操作类型 |
### 枚举
| 名称 | 描述 |
| -------- | -------- |
| [VGUPathDataType](_display.md#vgupathdatatype) { VGU_DATA_TYPE_S16 = 0, VGU_DATA_TYPE_S32, VGU_DATA_TYPE_F32 } | 路径坐标数据类型。 |
| [VGUCapability](_display.md#vgucapability) { VGU_CAP_BLIT = (1 << 0), VGU_CAP_BLIT_NUM = (1 << 1), VGU_CAP_PATH = (1 << 2), VGU_CAP_FILTER_BLUR = (1 << 3) } | 硬件加速能力。 |
| [VGUResult](_display.md#vguresult) { VGU_SUCCESS = 0, VGU_NO_SUPPORT = -1, VGU_OPERATION_FAILED = -2, VGU_OUT_OF_MEMORY = -3, VGU_TIMEOUT = -4, VGU_INVALID_PARAMETER = -5, VGU_BUSY = -6, VGU_NO_CONTEXT = -7 } | 错误码定义。 |
| [VGULineCap](_display.md#vgulinecap) { VGU_LINECAP_BUTT = 0, VGU_LINECAP_ROUND, VGU_LINECAP_SQUARE } | 线帽。 |
| [VGUJointType](_display.md#vgujointtype) { VGU_LINE_JOIN_MITER = 0, VGU_LINE_JOIN_ROUND, VGU_LINE_JOIN_BEVEL, VGU_LINE_JOIN_BUTT } | 联接类型。 |
| [VGUFilter](_display.md#vgufilter) { VGU_FILTER_BILINEAR = 0, VGU_FILTER_NEAREST, VGU_FILTER_LINEAR, VGU_FILTER_BUTT } | 图像滤波类型。 |
| [VGUFillRule](_display.md#vgufillrule) { VGU_RULE_WINDING = 0, VGU_RULE_EVEN_ODD, VGU_RULE_BUTT } | 填充规则定义。 |
| [VGUFillSpread](_display.md#vgufillspread) { VGU_SPREAD_PAD = 0, VGU_SPREAD_REFLECT, VGU_SPREAD_REPEAT, VGU_SPREAD_BUTT } | 渐变填充区域外的延展类型。 |
| [VGUWrapType](_display.md#vguwraptype) { VGU_WRAP_REFLECT = 0, VGU_WRAP_REPEAT, VGU_WRAP_BUTT } | 图像模式填充延展类型。 |
| [VGUPathCmd](_display.md#vgupathcmd) { VGU_PATH_CMD_CLOSE = 0, VGU_PATH_CMD_MOVE, VGU_PATH_CMD_LINE, VGU_PATH_CMD_HLINE, VGU_PATH_CMD_VLINE, VGU_PATH_CMD_QUAD, VGU_PATH_CMD_CUBIC, VGU_PATH_CMD_SQUAD, VGU_PATH_CMD_SCUBIC, VGU_PATH_CMD_BUTT } | 路径绘制指令类型。 |
| [VGUTransformType](_display.md#vgutransformtype) { VGU_TRANSFORM_TRANSLATE = (1 << 0), VGU_TRANSFORM_SCALE = (1 << 1), VGU_TRANSFORM_ROTATE_90 = (1 << 2), VGU_TRANSFORM_ROTATE_180 = (1 << 3), VGU_TRANSFORM_ROTATE_270 = (1 << 4), VGU_TRANSFORM_OTHER = (1 << 16) } | 变换类型。 |
| [VGUClipType](_display.md#vgucliptype) { VGU_CLIP_RECT = 0, VGU_CLIP_PATH, VGU_CLIP_BUTT } | 绘制表面剪切类型。 |
| [VGUGradientType](_display.md#vgugradienttype) { VGU_GRADIENT_LINEAR = 0, VGU_GRADIENT_RADIAL, VGU_GRADIENT_CONIC, VGU_GRADIENT_BUTT } | 渐变类型。 |
| [VGUPaintType](_display.md#vgupainttype) { VGU_PAINT_SOLID = 0, VGU_PAINT_GRADIENT, VGU_PAINT_PATTERN, VGU_PAINT_BUTT } | 渲染对象 |
### 函数
| 名称 | 描述 |
| -------- | -------- |
| [VGUPathInit](_display.md#vgupathinit) ([VGUPath](_v_g_u_path.md) \*path, [VGUPathDataType](_display.md#vgupathdatatype) type, const uint8_t \*segments, int numSegments, const uint8_t \*data, bool enAlias, [VGURect](_v_g_u_rect.md) boundBox) | [VGUResult](_display.md#vguresult)
初始化路径对象。 |
| [VGUPathAppend](_display.md#vgupathappend) ([VGUPath](_v_g_u_path.md) \*path, const [VGUPath](_v_g_u_path.md) \*subpath) | [VGUResult](_display.md#vguresult)
添加子路径到当前路径中。 |
| [VGUPathClear](_display.md#vgupathclear) ([VGUPath](_v_g_u_path.md) \*path) | [VGUResult](_display.md#vguresult)
清除路径对象内存。 |
| [VGUMatrixIdentity](_display.md#vgumatrixidentity) ([VGUMatrix3](_v_g_u_matrix3.md) \*matrix) | [VGUResult](_display.md#vguresult)
初始化矩阵对象为单位矩阵。 |
| [VGUMatrixScale](_display.md#vgumatrixscale) ([VGUMatrix3](_v_g_u_matrix3.md) \*matrix, float xScale, float yScale) | [VGUResult](_display.md#vguresult)
矩阵变换缩放。 |
| [VGUMatrixRotate](_display.md#vgumatrixrotate) ([VGUMatrix3](_v_g_u_matrix3.md) \*matrix, float degree) | [VGUResult](_display.md#vguresult)
矩阵变换旋转。 |
| [VGUMatrixTranslate](_display.md#vgumatrixtranslate) ([VGUMatrix3](_v_g_u_matrix3.md) \*matrix, float x, float y) | [VGUResult](_display.md#vguresult)
矩阵变换平移。 |
| [VGUGradientColorStop](_display.md#vgugradientcolorstop) ([VGUGradient](_v_g_u_gradient.md) \*gradient, const [VGUColorStop](_v_g_u_color_stop.md) \*colorStop, uint32_t count) | [VGUResult](_display.md#vguresult)
对渐变添加ColorStop。 |
| [VGUGradientClearStop](_display.md#vgugradientclearstop) ([VGUGradient](_v_g_u_gradient.md) \*gradient) | [VGUResult](_display.md#vguresult)
清除ColorStop。 |
| [VGUGradientMatrix](_display.md#vgugradientmatrix) ([VGUGradient](_v_g_u_gradient.md) \*gradient, const [VGUMatrix3](_v_g_u_matrix3.md) \*matrix) | [VGUResult](_display.md#vguresult)
设置渐变对象的变换矩阵。 |
| [VGUGradientLinear](_display.md#vgugradientlinear) ([VGUGradient](_v_g_u_gradient.md) \*gradient, const [VGUPoint](_v_g_u_point.md) \*p1, const [VGUPoint](_v_g_u_point.md) \*p2) | [VGUResult](_display.md#vguresult)
创建线性渐变对象。 |
| [VGUGradientRadial](_display.md#vgugradientradial) ([VGUGradient](_v_g_u_gradient.md) \*gradient, const [VGUPoint](_v_g_u_point.md) \*p1, [VGUScalar](_display.md#vguscalar) r1, const [VGUPoint](_v_g_u_point.md) \*p2, [VGUScalar](_display.md#vguscalar) r2) | [VGUResult](_display.md#vguresult)
创建辐射渐变对象 |
| [VGUGradientConic](_display.md#vgugradientconic) ([VGUGradient](_v_g_u_gradient.md) \*gradient, [VGUScalar](_display.md#vguscalar) cx, [VGUScalar](_display.md#vguscalar) cy) | [VGUResult](_display.md#vguresult)
创建圆锥渐变对象。 |
| [VGUInitialize](_display.md#vguinitialize) ([VGUFuncs](_v_g_u_funcs.md) \*\*funcs) | [VGUResult](_display.md#vguresult)
获取硬件加速相关的操作接口指针。 |
| [VGUUninitialize](_display.md#vguuninitialize) ([VGUFuncs](_v_g_u_funcs.md) \*funcs) | [VGUResult](_display.md#vguresult)
去初始化硬件加速模块,同时释放硬件加速模块操作函数指针。 |