Chinaunix首页 | 论坛 | 博客
  • 博客访问: 109097
  • 博文数量: 24
  • 博客积分: 1475
  • 博客等级: 上尉
  • 技术积分: 291
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-04 14:14
个人简介

交互设计在未来很有前途,不要再说是做界面的了。

文章分类

全部博文(24)

文章存档

2013年(2)

2012年(2)

2010年(4)

2009年(2)

2007年(11)

2006年(3)

我的朋友

分类: C/C++

2007-10-01 09:45:49

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

2.The value of the transform attribute is a , 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
 
  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. Attributes x, y, width and height (and any   other attributes or properties) are treated as values in the new user coordinate system, not the   previous user coordinate system.
  如果一个元素使用了transform属性,那么坐标变换时首先要处理的就是transform属性,然后才是其它的坐标
  或者长度或高度的值。例如,在
   
  这样一个元素中,先要把当前的坐标系统进行乘2变换后,才会处理x,y,width和height属性。x,y,width和height(
  还有一些其它与坐标有关的属性)是在新的坐标系统终的值,而不再是原来的用户坐标系统中的值。
 
  解析处理元素坐标时,首先要处理transform属性,然后才是其它属性。
 

阅读(2362) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~