From a list of layers and a desired screen size, determine the size of viewing area that preserves the aspect ratio of the layers' bounds and fits within the given size.
From a real-world envelope and a Rectangle representing the display area, expand the envelope so that it matches the aspect ratio of the desired viewing window.
From a real-world envelope and a Rectangle representing the display area, expand the envelope so that it matches the aspect ratio of the desired viewing window. The center of the envelope is preserved.