Built-in macros: $ScreenOrientation
The $ScreenOrientation macro is replaced by the value specified in the ScreenOrientation attribute of the profile the code is currently compiled for.
Content
Normal
Rotated_90
Rotated_180
Rotated_270
Discussion
The original attribute ScreenOrientation determines the desired orientation of the display in the target device. If due to technical or design aspects you need to install the display in a particular orientation, you use this attribute to advise Embedded Wizard to preprocess and rotate all bitmap resources accordingly during the code compilation. In this manner the target system can still handle natively with the bitmaps (e.g. by using a GPU core) without having to rotate all surfaces on the fly.
This macro can be used to conditionally compile the application. For example, if you want a code section to be executed only when the application is compiled for a display rotated by 270 degree, you can implement following code at the appropriate location within your component:
$if $ScreenOrientation == Rotated_270 SomeObject.PerformSomeOperation(); $endif
When compiling the application for another setting (e.g. Rotated_180), the above code section is simply ignored. The macro can also be used inside a string literal to format e.g. a trace debug message:
trace "The screen orientation is $ScreenOrientation";