public static SizeD FitToArea(SizeD s, SizeD max_s) { double f = GetFitToAreaScalingFactor(s.Width, s.Height, max_s.Width, max_s.Height); SizeD output = new SizeD(s.Width * f, s.Height * f); return(output); }
public static double GetFitToAreaScalingFactor( SizeD s, SizeD max) { return GetFitToAreaScalingFactor( s.Width , s.Height , max.Width , max.Height ); }
public static SizeD FitToArea( SizeD s, SizeD max_s) { double f = GetFitToAreaScalingFactor( s.Width , s.Height , max_s.Width , max_s.Height ); SizeD output = new SizeD( s.Width * f, s.Height * f ); return output; }
public RectangleD(double x, double y, SizeD size) { this.p0.X = x; this.p0.Y = y; this.size = size; }
public static double GetFitToAreaScalingFactor(SizeD s, SizeD max) { return(GetFitToAreaScalingFactor(s.Width, s.Height, max.Width, max.Height)); }