在起始角度和结束角度之间,两个颜色之间过渡的渐变。
语法
<SweepGradient centerX="float" centerY="float" startAngle="float" endAngle="float" colors="argb-color argb-color" positions="float float" />
属性
SweepGradient 元素具有以下属性
必填属性
以下属性是必需的
centerX半径中心的 x 坐标。
此属性是 可转换的。
centerY半径中心的 y 坐标。
此属性是 可转换的。
startAngle渐变开始的角度(以度为单位)。
此属性是 可转换的。
endAngle渐变结束的角度(以度为单位)。
此属性是 可转换的。
colors颜色列表,用空格分隔。必须使用 ARGB 格式(
#ff000000= 不透明黑色)或 RGB 格式(#000000= 黑色)指定每个颜色。positions浮点数列表,用空格分隔。colors 属性中每个对应颜色的相对位置 [0..1]。如果此字符串为空,则颜色将均匀分布在渐变线上。
可选属性
以下属性是可选的
direction- 扫描的方向。可以是
CLOCKWISE或COUNTER_CLOCKWISE。默认为CLOCKWISE。
内部元素
SweepGradient 元素可以包含 0 到 4 个 Transform 元素。