|
-
Mar 19th, 2008, 11:14 AM
#1
geometry question
I am building a custom view (UI control) for an application I am working on, but it has been so long since I have really had to use any applied geometry other than the basics that I am not sure if there is an easy geometry formula to tackle this.
The issue at hand, is I will have a window of variable size. This window will contain images, and the number of images is also variable.
The images displayed within the window, need to size and position themselves based on the number of images to be shown. So if only 1 image is to be shown, it will take up as much of the window as possible, if 2 images, they will fill as much of the window is possible. 10 images, same thing.
One key thing here also is the images will at least be in constant proportion in terms of their size to each other, and also their height and width. So all images will all be the same size for the given layout, and also when the height and width gets calculated based on the number of images to show, the height/width ratio should stay the same (ie I don't want to stretch the image just to fill the entire window)
Here are a few images to illustrate this (note sizes of red rectangles in each image are always the same). Is there any specific geometric formula to do this?
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|