ShadingPattern

ShadingPattern

new ShadingPattern(type, coords, colors, gStateopt, matrixopt)

Source:

描述渐变图案的模式。

仅在"advanced" API模式下可用。

Parameters:
名称 类型 属性 描述
type String

"axial"(轴向)或"radial"(径向)之一

coords Array.<Number>

对于"axial"类型是[x1, y1, x2, y2],描述两个插值点;对于"radial"类型是[x1, y1, r, x2, y2, r2],描述内圆和外圆。

colors Array.<Object>

包含"offset"和"color"字段的对象数组。"offset"描述参数空间[0, 1]中的偏移量。"color"是一个长度为3的数组,描述[0, 255]范围内的RGB值。

gState GState <optional>

应用于图案的附加图形状态(可选)。

matrix Matrix <optional>

描述图案坐标系统和使用坐标系统之间转换的矩阵(可选)。

继承

  • API.Pattern