Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Difference between contentWidth, logicalWidth, deviceWidth ? — Gideros Forum

Difference between contentWidth, logicalWidth, deviceWidth ?

GhandoGhando Member
edited January 2012 in General questions
Hi all,
was hoping someone could someone confirm if I understand the difference between the three.

contentWidth: takes into account the orientation of the device when returning the width in pixels (eg on an iPhone 3GS in portrait it will return 320 but in landscape will return 480)

deviceWidth: returns the width in pixels (eg on an iPhone 3GS it will return 320 regardless of if you're in portrait or landscape)

logicalWidth: ignores the device and just returns whatever you've set in the "Logical dimensions" in the project properties.

I'm assuming Gideros uses the Logical dimensions in conjunction with the Scale Mode to magically re-format for different sized displays, so if that's right, when would you actually use logicalWidth/logicalHeight in your code?

Comments

Sign In or Register to comment.