GUI_MEMDEV_MoveOutWindow() with orientated GUI

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • GUI_MEMDEV_MoveOutWindow() with orientated GUI

      Hello,

      I'd like to use the functions GUI_MEMDEV_MoveInWindow() and GUI_MEMDEV_MoveOutWindow() in my application but, since I'm using also at the beginning GUI_SetOrientation(GUI_SWAP_XY | GUI_MIRROR_X) to change the orientation from "landscape" to "portrait" (the display is natively landscape but my application is portrait), it looks like GUI_MEMDEV_MoveOutWindow() works only with the physical orientation of the display.

      Using MoveOutWindow in this way leads to a Hard fault:
      WM_HideWindow(pMsg->hWin);
      WM_ShowWindow(_hWin0);
      GUI_MEMDEV_MoveOutWindow(pMsg->hWin, 0, 320, 0, 200);

      If I do a rotation before using the MoveOutWindow function as :
      WM_HideWindow(pMsg->hWin);
      WM_ShowWindow(_hWin0);
      GUI_SetOrientationEx(GUI_ROTATION_0, 0);
      GUI_MEMDEV_MoveOutWindow(pMsg->hWin, 0, 320, 0, 200);
      GUI_SetOrientationEx(GUI_SWAP_XY | GUI_MIRROR_X, 0);

      The function is executed but the window is of course rotated as depicted.

      Is there anything I'm missing in the code or any workaround to use both move window and a swapped orientated display?

      Thank you.

      Mark
      Images
      • Swipe_MemDev_01.PNG

        375.39 kB, 508×565, viewed 607 times
      • Swipe_MemDev_02.PNG

        395.22 kB, 499×586, viewed 556 times
      • Swipe_MemDev_03.PNG

        341.63 kB, 504×505, viewed 542 times
      • Swipe_MemDev_04.PNG

        372.32 kB, 496×553, viewed 586 times
    • Hi,

      I will take alook into it.

      You might also want to take a look at the emWin animation module. We use it far more often for animating windows. It is less memory intensive and and can be used not only for windows.

      Attached is a simple example. It moves a window left or right on button press. For more information refer to the emWin user manual chapter '14 Animations'.

      Regards,
      Sven
      Files
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.