Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Maths - screen aspect ratio

Author
Message
AlexI
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 3rd Jan 2009 14:55
Hi,
How can I get the screen ration using the screen width and the screen height?

I need to tell if its a wide screen or not.

Thanks,
Alex

Chris K
20
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 3rd Jan 2009 14:57
?

Just divide height by width, 9 / 16 = 0.5625 which is standard widescreen.

-= Out here in the fields, I fight for my meals =-
AlexI
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 3rd Jan 2009 15:04 Edited at: 3rd Jan 2009 15:41
Ah i see.

So wide screen laptop:

1280x800 = 1.6
1440x900 = 1.6

and normal screen:

800x600 = 1.3
1024x768 = 1.3
1280x1024 = 1.25???

whats up with 1280x1024 ?

I meant ratios like 4:3 is normal, I just really need to able to work out if its a laptop screen or a normal screen

SunDawg
19
Years of Service
User Offline
Joined: 21st Dec 2004
Location: Massachusetts
Posted: 3rd Jan 2009 18:29 Edited at: 3rd Jan 2009 18:32
1280x1024 isn't 4:3, it's 5:4. 1280x960 is 4:3, however. Try thinking like this, the first number in the ratio, 4, is the width, and the second number, 3, is the height. If you divide the display's width by the ratio's width number, and the display's height by the ratio's height number, then you should have the same answer if you are using the correct aspect ratio. If 1024x768 is 4:3, then (1024/4)=(768/3).


My site, for various stuff that I make.
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 7th Jan 2009 00:47
Yeah, I have 1280x1024, it's the highest my video card will support for a single monitor (it's even higher with two, how messed up is that?)

It's slightly taller than 1280x960, of course. Most things look better.
AlexI
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 7th Jan 2009 15:26
I see

The problem I had was designing a menu to work on most screen resoloutions. But I think what I will do is make about 3 versions of the menu at different aspect ratios and then it can choose the one closest to your screen.

Login to post a reply

Server time is: 2024-09-30 15:15:42
Your offset time is: 2024-09-30 15:15:42