
当妳想要同时缩放多个元素,并且让它们缩放之后还保持相对位置关系时,则需要将它们的缩放中心指定为同一个点。具体对于raphael中元素的scale方法,缩放中心就是由第三个和第四个参数来指定的。scale(x,y, cx,cy )。
http://stackoverflow.com/questions/3352698/scaling-multiple-paths-with-raphael
亮点:
|
9 down vote accepted |
scale can accept four parameters: scale(x, y, cx, cy); where cx and cy are coordinates of the centre of scaling. By default it is in the middle of the shape. So, to scale two shapes you need to scale then relative to the same centre.
|
||||||||
|
未知美人
HxLauncher: Launch Android applications by voice commands