eGUI - Screen orientation.

キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

eGUI - Screen orientation.

233件の閲覧回数
john71
Senior Contributor I

If I set a screen orientation D4D_ORIENT_LANDSCAPE

status = D4D_Init(&screen_splash);

D4D_SetOrientation(D4D_ORIENT_LANDSCAPE);

 I see a full screen and all graphical objects on it.

But if I set D4D_ORIENT_PORTRAIT

status = D4D_Init(&screen_splash);

D4D_SetOrientation(D4D_ORIENT_PORTRAIT);

I see a half of the screen and graphical objects displayed wrong.

What should I do to fix it?

0 件の賞賛
2 返答(返信)

104件の閲覧回数
Jonathan_Iglesias
NXP TechSupport
NXP TechSupport

Hello Evgeny Erenburg,

Hope you are doing great.

This may be happening because you put the position values of the objects as absolute values instead of relative values.

if you  change this values to relative ones  the screen should always fit.the values you put in the objects put them out of the screen when you change it because the width of landscape is bigger than portrait. take as reference the width of your screen to position the objects. please send me  the  way you position your  objects (D4D_DECLARE_GROUP_BOX_BEGIN) to give you a better answer.

Have a great day.

Jonathan

0 件の賞賛

104件の閲覧回数
john71
Senior Contributor I

Hi Jonathan,

Thank you for the reply. I found the problem. It should be D4D_DECLARE_STD_PORTRAIT_SCREEN_BEGIN(screen_main, ScreenMain_) instead of D4D_DECLARE_STD_SCREEN_BEGIN(screen_main, ScreenMain_).

Regards.

0 件の賞賛