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


      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:
      GUI_MEMDEV_MoveOutWindow(pMsg->hWin, 0, 320, 0, 200);

      If I do a rotation before using the MoveOutWindow function as :
      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.

      • Swipe_MemDev_01.PNG

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

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

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

        372.32 kB, 496×553, viewed 56 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'.