svg规范关于transform属性的说明

在将svg图形格式转化为其它格式图形的工作中,坐标变换是首当其冲的一件工作,下面我们结合svg规范看看svg
是如何处理坐标变换的,理解了这些,再将其转化成你想要的图形格式的变换方式也就不困难了。
1.svg采用的初始坐标系统是视图坐标系,即屏幕左上角为左边原点,y轴正方向朝下,x轴正方向朝右

2.The value of the transform attribute is a <transform-list>, which is defined as a list of transform  definitions, which are applied in the order provided.
  transform属性的值是一个变换列表,它们将根据在svg文件中的顺序依次起作用。

  解析transform值时,一定要根据各个变换出现的顺序进行处理,而不能根据变换的类型进行处理。 

3.The transform attribute is applied to an element before processing any other coordinate or length values supplied for that element. In the element
  <rect x="10" y="10" width="20" height="20" transform="scale(2)"/>
  the x, y, width and height values are processed after the current coordinate system has been scaled uniformly by a factor of 2 by the transform attribute.

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 6
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值