My question is in my title. I am trying to develop a logic so that I can scale fixed aspect ratio windows to cover most of the screen without overlapping eachother. There could be two three or four windows. There could be an alignment parameter also.
views:
43answers:
1You my friend will want to start reading this
http://stackoverflow.com/questions/729640/optimal-layout-algorithm
this is a common problem in 2d game development ... think about the problem of how to pack sprites onto a sprite sheet. IE it well understood in 2d especvially seeing a you are dealing with rectangles. I am assuming that they are fixed aspect ratio and different sizes or else its simple maths. If i am wrong just shout and i will give you an algorithm.
There is another question on here about the
I don't want to go on and on because that link will lead you to where you want to be ...
this shuold be interesting http://primes.utm.edu/glossary/xpage/SieveOfEratosthenes.html
there was a good question bout the sieve ... well worth a read also http://stackoverflow.com/questions/1287607/help-speed-up-this-algorithm-sieve-of-eratosthenes