Relative coordinates and aspect ratio
Posted: Mon Sep 29, 2008 12:58
Hello,
I run into this situation quite often: I am using relative coordinates so the gui works at different sizes and resolutions. Somtimes the gui consists of circles and I set relative their size to e.g. (0.1, 0.1). When the circle is displayed it doesn't appear as a circle, but as an ellipse. This is because my resolution is like 800x600 and the aspect ratio is not 1. Therefore the circle gets a size of 0.1 * 800, 0.1 * 600 which is 80,60 (an ellipse).
What's the recommended way to deal with aspect issues? Has CEGUI some builtin functionality to make this easier to work with? How are you dealing with aspect ratio issues?
-Matthias
P.S.: I know I can do all the scaling myself, but this seems a bit too much work.
I run into this situation quite often: I am using relative coordinates so the gui works at different sizes and resolutions. Somtimes the gui consists of circles and I set relative their size to e.g. (0.1, 0.1). When the circle is displayed it doesn't appear as a circle, but as an ellipse. This is because my resolution is like 800x600 and the aspect ratio is not 1. Therefore the circle gets a size of 0.1 * 800, 0.1 * 600 which is 80,60 (an ellipse).
What's the recommended way to deal with aspect issues? Has CEGUI some builtin functionality to make this easier to work with? How are you dealing with aspect ratio issues?
-Matthias
P.S.: I know I can do all the scaling myself, but this seems a bit too much work.