/* Corresponds to the matrix definition in SVG. See http://www.w3.org/TR/SVG/coords.html#TransformMatrixDefined for details. */ geom2d:Point function times(geom2d:Matrix m,geom2d:Point p) { var double a,b,c,d,e,f,x,y,rsx,rsy,geom2d:Point rs; a = m . geom2d:a; b = m . geom2d:b; c = m . geom2d:c; d = m . geom2d:d; e = m . geom2d:e; f = m . geom2d:f; x = p . geom:x; y = p . geom:y; rsx = a * x + c * y + e; rsy = b * x + d * y + f; rs = new(geom2d:Point); rs . geom:x = rsx; rs . geom:y = rsy; return rs; } SeqOf(geom2d:Point) function times(geom2d:Matrix m,SeqOf(geom2d:Point) pnts) { var SeqOf(geom2d:Point) rs,int ln,i; rs = new(SeqOf(geom2d:Point)); ln = length(pnts); for (i=0;i