圆环套圆心

先画一个白色的大圆,上面再叠加一个红色的圆
- 代码:
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 的两倍图和三倍图

本文介绍了如何在Mac上利用ImageMagick工具制作Xcode应用的圆形图标,通过绘制白色背景的大圆并在其上叠加红色小圆,生成不同尺寸的需求图标。
最低0.47元/天 解锁文章
620

被折叠的 条评论
为什么被折叠?



