圆环套圆心
先画一个白色的大圆,上面再叠加一个红色的圆
- 代码:
imgTwoClass(){
Width=$1
StrokeW=3
((Radius = $Width * 0.5))
((StrokeW_second = $StrokeW * 2))
convert -size ${Width}x${Width} xc:none \
-draw "fill \"#FFFFFF\" circle ${Radius},${Radius} ${Radius},0
fill \"#FF2D55\" circle ${Radius},${Radius} ${Radius},${StrokeW_second}" circle_pure@2x.png
((Width_third = $Width * 1.5))
((Radius_third = $Width_third * 0.5))
((StrokeW_third = $StrokeW * 3))
convert -size ${Width_third}x${Width_third} xc:none \
-draw "fill \"#FFFFFF\" circle ${Radius_third},${Radius_third} ${Radius_third},0
fill \"#FF2D55\" circle ${Radius_third},${Radius_third} ${Radius_third},${StrokeW_third}" circle_pure@3x.png
}
alias cirtw="imgTwoClass"
- 调用:
cirtw 28
传参是正方形的直径
需要 14 X 14 Pt 的两倍图和三倍图