Member attributes: ScreenOrientation

This attribute determines the actual installation orientation of the display in your target device.

Syntax

Normal

Rotated_90

Rotated_180

Rotated_270

Discussion

If due to technical or design aspects you need to install the display in a particular orientation, you can use the attribute ScreenOrientation to correspondingly control the orientation of how bitmap resources are converted for the target system when generating code for a particular profile member. In this manner the target system can still handle with the bitmaps natively (e.g. by using a GPU core) without having to rotate the surfaces at the runtime. This attribute can take one of the following values:

Value

Description

Normal

The origin of the framebuffer is located at the top-left corner of the display. This is the default setting for a not rotated display installation.

Rotated_90

The origin of the framebuffer is located at the bottom-left corner of the display. The display appears installed rotated by 90 degrees in counter-clockwise direction.

Rotated_180

The origin of the framebuffer is located at the bottom-right corner of the display. The display appears installed rotated by 180 degrees.

Rotated_270

The origin of the framebuffer is located at the top-right corner of the display. The display appears installed rotated by 90 degrees in clockwise direction.

CAUTION

The setting of this attribute should always correspond to the value of the EW_SURFACE_ROTATION macro definition used when compiling the Graphics Engine. If you are using one of our prepared Build Environments you can configure this macro conveniently in the file ewconfig.h. Otherwise you configure it in the make file or your build process.

The value of this attribute can be evaluated within your implementation by using the built-in macro $ScreenOrientation.

Modify the attribute

To inspect or modify the value of a ScreenOrientation attribute, select first the affected profile member. Thereupon, the attribute is listed in the middle area of Inspector. Please note the assistant you can activate by clicking on the button right to the attribute:

Please note, the attribute can be hidden if the Platform Package selected in the particular profile member doesn't allow the configuration of the display orientation. Moreover, the attribute has no effect in the prototyping environment.