private ArrayList GetCornerValues(int smallestWidth, int smallestHeight) { Size max = new Size(c_maxCornerSize, c_maxCornerSize); Size min = new Size(c_minCornerSize, c_minCornerSize); GetMaxSize(max, smallestWidth, smallestHeight); ArrayList values = new ArrayList(); for (int height = min.Height; height <= max.Height; height++) { for (int width = min.Width; width <= max.Width; width++) { object value = new Size(width, height); values.Add(value); } } return values; }
private Size GetMaxSize(Size currSize, int smallestWidth, int smallestHeight) { int width = (int)Math.Min(smallestWidth / 2, currSize.Width); int height = (int)Math.Min(smallestHeight / 2, currSize.Height); return new Size(width, height); }