public static Matrix4D GetBoundsToScreenTransform( double minX, double minY, double maxX, double maxY, int width, int height, int margin) { return(Transformation4D.GetScaleTransform(new Point3D(minX, minY, 0.0), new Point3D(maxX, maxY, 0.0), new Point3D(0.5 * (minX + maxX), 0.5 * (minY + maxY), 0.0), new Point3D((double)margin, (double)(height - 1 - margin), 0.0), new Point3D((double)(width - 1 - margin), (double)margin, 0.0), new Point3D(0.5 * (double)(width - 1), 0.5 * (double)(height - 1), 0.0))); }
public static Matrix4D GetScaleTransform( Point3D fromPoint1, Point3D fromPoint2, Point3D fromReferencePoint, Point3D toPoint1, Point3D toPoint2, Point3D toReferencePoint) { double scaling; return(Transformation4D.GetScaleTransform(fromPoint1, fromPoint2, fromReferencePoint, toPoint1, toPoint2, toReferencePoint, out scaling)); }