sus-e Posted May 22, 2019 Share Posted May 22, 2019 Hello, I'm using MTDS, that is working well in portraito mode. But when I change orientation to landscape mode, the TextOut() dosen't draw beyond 30 chars(240 pixel?). My initialization code as follows. Do I need some more setting for landscape mode? regards, mtds.begin(); hdsDisp = mtds.GetDs(); hbmp = mtds.GetDisplayBitmap(); mtds.SetDrawingSurface(hdsDisp, hbmp); mtds.SetFgColor(hdsDisp, clrWhite); mtds.SetBgColor(hdsDisp, clrBlack); mtds.SetTransColor(hdsDisp, clrBlack); mtds.SetPen(hdsDisp, penSolid); mtds.SetDrwRop(hdsDisp, drwCopyPen); mtds.SetBkMode(hdsDisp, bkOpaque); mtds.SetFont(hdsDisp, hfntConsole); mtds.SetIntensity(hdsDisp, 100); mtds.SetDisplayOrientation(dsoLandscape); mtds.TextOut(hdsDisp, 0, 0, 40, "1234567890abcdefghijABCDEFGHIJ!@#$%^&*()"); Link to comment Share on other sites More sharing options...
JColvin Posted May 22, 2019 Share Posted May 22, 2019 Hi @sus-e, One thing that I would try would be to call the mtds.SetDisplayOrientation prior to the mtds.SetDrawingSurface since the latter function tells the system where the drawing surface is, so it is my understanding that currently the code is unaware that the drawing surface has been reoriented. Let me know how this goes. Thanks, JColvin Link to comment Share on other sites More sharing options...
sus-e Posted May 31, 2019 Author Share Posted May 31, 2019 JColvin, thanks for your answer, but the target device is assigned another project and I could not test with your method. I'll post result of test when I can use target device. thanks, sus-e Link to comment Share on other sites More sharing options...
Question
sus-e
Hello,
I'm using MTDS, that is working well in portraito mode. But when I change orientation to landscape mode,
the TextOut() dosen't draw beyond 30 chars(240 pixel?). My initialization code as follows.
Do I need some more setting for landscape mode?
regards,
mtds.begin();
hdsDisp = mtds.GetDs();
hbmp = mtds.GetDisplayBitmap();
mtds.SetDrawingSurface(hdsDisp, hbmp);
mtds.SetFgColor(hdsDisp, clrWhite);
mtds.SetBgColor(hdsDisp, clrBlack);
mtds.SetTransColor(hdsDisp, clrBlack);
mtds.SetPen(hdsDisp, penSolid);
mtds.SetDrwRop(hdsDisp, drwCopyPen);
mtds.SetBkMode(hdsDisp, bkOpaque);
mtds.SetFont(hdsDisp, hfntConsole);
mtds.SetIntensity(hdsDisp, 100);
mtds.SetDisplayOrientation(dsoLandscape);
mtds.TextOut(hdsDisp, 0, 0, 40, "1234567890abcdefghijABCDEFGHIJ!@#$%^&*()");
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.