eGUI - Screen orientation.

取消
显示结果 
搜索替代 
您的意思是: 

eGUI - Screen orientation.

230 次查看
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 回复数

101 次查看
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 项奖励

101 次查看
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 项奖励