System.Drawing.Graphics.TransformPoints C# (CSharp) Method

TransformPoints() public method

public TransformPoints ( CoordinateSpace destSpace, CoordinateSpace srcSpace, Point pts ) : void
destSpace CoordinateSpace
srcSpace CoordinateSpace
pts Point
return void
        public void TransformPoints(CoordinateSpace destSpace, CoordinateSpace srcSpace, Point [] pts)
        {
            if (pts == null)
                throw new ArgumentNullException ("pts");

            Matrix transform = new Matrix();
            ConversionHelpers.GetGraphicsTransform (this, destSpace, srcSpace, ref transform);
            transform.TransformPoints (pts);
        }

Same methods

Graphics::TransformPoints ( CoordinateSpace destSpace, CoordinateSpace srcSpace, PointF pts ) : void

Usage Example

Example #1
0
 protected PointF[] getScreenBoundsInWorldCoordinates(Graphics g)
 {
     Rectangle screenBounds = canvas.ClientRectangle;
     PointF[] transformedPoints = new PointF[] { new PointF((float)screenBounds.X, (float)screenBounds.Y), new PointF((float)screenBounds.Width, (float)screenBounds.Height) };
     g.TransformPoints(CoordinateSpace.World, CoordinateSpace.Page, transformedPoints);
     return transformedPoints;
 }
All Usage Examples Of System.Drawing.Graphics::TransformPoints