コード例 #1
0
        public static IntRectangle Denormalize(this ICoordinateSystem coordinateSystem, IntRectangle bounds, IntRectangle referenceBounds)
        {
            var center          = bounds.Center;
            var referenceCenter = referenceBounds.Center;

            return(IntRectangle.FromCenterAndSite(
                       new IntVector(
                           coordinateSystem.DenormalizeX(center.X, referenceCenter.X),
                           coordinateSystem.DenormalizeY(center.Y, referenceCenter.Y),
                           center.Z),
                       bounds.Size));
        }
コード例 #2
0
 public static IntVector Denormalize(this ICoordinateSystem coordinateSystem, IntVector position, IntVector referencePosition)
 {
     return(new IntVector(coordinateSystem.DenormalizeX(position.X, referencePosition.X), coordinateSystem.DenormalizeY(position.Y, referencePosition.Y), position.Z));
 }