ToPointF() public method

public ToPointF ( ) : PointF
return PointF
示例#1
0
		/// <summary>
		/// Converts a <see cref="SizeF"/> from destination to source coordinates.
		/// </summary>
		/// <remarks>
		/// Only scale and rotation are applied when converting sizes; this is equivalent
		/// to converting a direction vector, as direction vectors have only magnitude
		/// and direction information, but no position.
		/// </remarks>
		public SizeF ConvertToSource(SizeF destinationDimensions)
		{
			PointF[] transformed = new PointF[] {destinationDimensions.ToPointF()};
			Matrix inverse = this.CumulativeTransform.Clone();
			inverse.Invert();
			inverse.TransformVectors(transformed);
			return new SizeF(transformed[0]);
		}
示例#2
0
		/// <summary>
		/// Converts a <see cref="SizeF"/> from source to destination coordinates.
		/// </summary>
		/// <remarks>
		/// Only scale and rotation are applied when converting sizes; this is equivalent
		/// to converting a direction vector, as direction vectors have only magnitude
		/// and direction information, but no position.
		/// </remarks>
		public SizeF ConvertToDestination(SizeF sourceDimensions)
		{
			PointF[] transformed = new PointF[] {sourceDimensions.ToPointF()};
			this.CumulativeTransform.TransformVectors(transformed);
			return new SizeF(transformed[0]);
		}