示例#1
0
		/// <summary>
		/// Returns the hitted point in world coordinated by applying the inverse current coordinate transformation and then the provided inverse coordinate transformation.
		/// </summary>
		/// <returns>Hitted point in world coordinates.</returns>
		public PointD2D GetHittedPointInWorldCoord(MatrixD2D additionalTransform)
		{
			var result = GetHittedPointInWorldCoord();
			result = additionalTransform.InverseTransformPoint(result);
			return result;
		}
示例#2
0
		/// <summary>
		/// Returns the hitted area in world coordinated by applying the inverse current coordinate transformation and then the provided inverse coordinate transformation.
		/// </summary>
		/// <returns>Hitted point in world coordinates.</returns>
		public MatrixD2D GetHittedAreaInWorldCoord(MatrixD2D additionalTransform)
		{
			var pt0 = _transformation.InverseTransformPoint(_hittedAreaInPageCoord.Location);
			var pt1 = _transformation.InverseTransformVector(new PointD2D(0, _hittedAreaInPageCoord.Height));
			var pt2 = _transformation.InverseTransformPoint(new PointD2D(_hittedAreaInPageCoord.Width, 0));

			pt0 = additionalTransform.InverseTransformPoint(pt0);
			pt1 = additionalTransform.InverseTransformVector(pt1);
			pt2 = additionalTransform.InverseTransformVector(pt2);

			var result = new MatrixD2D(pt1.X, pt1.Y, pt2.X, pt2.Y, pt0.X, pt0.Y);
			return result;
		}