public ReadOnlyCoordinatesSystemManager(double maxCellSize, double minCellSize, MathRect inputRange, Rect outputRange, CoordinatesSystem coordinatesSystem) : this() { MaxCellSize = maxCellSize; MinCellSize = minCellSize; InputRange = inputRange; OutputRange = outputRange; CoordinatesSystem = coordinatesSystem; WidthRatio = outputRange.Width / inputRange.Width; HeightRatio = outputRange.Height / inputRange.Height; Origin = ComputeOutCoordinates(new Point(0.0, 0.0)); OrthonormalOrigin = ComputeOutOrthonormalCoordinates(new Point(0.0, 0.0)); }
public Rect ComputeInCoordinates(MathRect rect) => new Rect(ComputeInCoordinates(rect.TopLeft), ComputeInCoordinates(rect.BottomRight));
public Rect ComputeOutOrthonormalCoordinates(MathRect rect) => new Rect(ComputeOutOrthonormalCoordinates(rect.TopLeft), ComputeOutOrthonormalCoordinates(rect.BottomRight));