Transformation
概述
映射变换
用法示例
var transformation = new FMap.Transformation(2, 5, -1, 10),
p = FMap.point(1, 2),
p2 = transformation.transform(p),
//FMap.point(7, 8)
p3 = transformation.untransform(p2); //FMap.point(1, 2)
创建(Creation)
创建:
创建 | 描述 |
---|---|
new FMap.Transformation( <Number> a, <Number> b, <Number> c, <Number> d ) | 创建具有给定系数转换对象 |
方法(Methods)
方法:
选项 | 类型 | 默认值 | 描述 |
---|---|---|---|
transform( ) | <Point> point,<Number> scale? | Point | 返回转换后的坐标点,给定的坐标点乘以系数,只接受FMap.Point的实例, 而不是数组 |
untransform() | <Point> point,<Number> scale? | Point | 返回转换后的坐标点,给定的坐标点除以系数,只接受FMap.Point的实例, 而不是数组 |