GeoTransform constructor
GeoTransform({})
Defines an arbitrary transform using the methods defined on the specified methods object.
Any undefined methods will use pass-through methods that propagate inputs to the output stream. For example, to reflect the y-dimension (see also GeoIdentity.reflectX):
var reflectY = GeoTransform(point: (stream, x, y, [z]) {
stream.point([x, -y]);
});
Or to define an affine matrix transformation:
matrix(a, b, c, d, tx, ty) => GeoTransform(point: (stream, x, y, [z]) {
stream.point([a * x + b * y + tx, c * x + d * y + ty]);
});
Implementation
GeoTransform(
{void Function(GeoStream, num, num, [num?])? point,
void Function(GeoStream)? sphere,
void Function(GeoStream)? lineStart,
void Function(GeoStream)? lineEnd,
void Function(GeoStream)? polygonStart,
void Function(GeoStream)? polygonEnd})
: _point = point,
_sphere = sphere,
_lineStart = lineStart,
_lineEnd = lineEnd,
_polygonStart = polygonStart,
_polygonEnd = polygonEnd;