Beispiel #1
0
 /// <summary>
 /// Creates a transformation matrix that transforms coordinates the viewport of given size to inside the given rectangle. The bottom-left of the rectangle is assumed to be the origin.
 /// </summary>
 /// <param name="rectangle"></param>
 /// <param name="width"></param>
 /// <param name="height"></param>
 /// <returns></returns>
 public static Matrix2D ToRectangle(RectangleF2D rectangle, double width, double height)
 {
     return(Matrix2D.ToRectangle(rectangle, width, height, false, false));
 }
Beispiel #2
0
 /// <summary>
 /// Creates a transformation matrix that transforms coordinates from the view port to scene-coordinates.
 /// </summary>
 /// <param name="pixelsWidth"></param>
 /// <param name="pixelsHeight"></param>
 /// <returns></returns>
 public Matrix2D CreateFromViewPort(double pixelsWidth, double pixelsHeight)
 {
     // from viewport means to rectangle.
     return(Matrix2D.ToRectangle(_rectangle, pixelsWidth, pixelsHeight, _invertX, _invertY));
 }