mac 上使用 image magick,制作 Xcode 的简单的 ⭕️ 图标

本文介绍了如何在Mac上利用ImageMagick工具制作Xcode应用的圆形图标,通过绘制白色背景的大圆并在其上叠加红色小圆,生成不同尺寸的需求图标。
摘要由CSDN通过智能技术生成

圆环套圆心

 

 

先画一个白色的大圆,上面再叠加一个红色的圆

  • 代码:

 

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 的两倍图和三倍图

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值