Problem with Zoom & Rotate Functions

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

  • Problem with Zoom & Rotate Functions

    Hi,
    I need to zoom a bitmap, like 'Segger Logo' being zoomed in demo. I referred to the example _RotateAndZoomImage() in MEMDEV_ZoomandRotate.c file. If I'm correct, the above function is being called when ever the zooming or rotate is needed, thought I couldn't understand it completely. But I also found the function

    Source Code

    1. void GUI_MEMDEV_Rotate (GUI_MEMDEV_Handle hSrc, GUI_MEMDEV_Handle hDst, int dx, int dy, int a, int Mag);
    used for rotation & zoom, but it seems that it doesn't work for bitmaps. The emWin manual is also not of much help in this case. Please help me with this. ?(
    Thank you.

    -- Rahul.

    The post was edited 4 times, last by rahul ().

  • Dear Rahul,

    You are right. The function GUI_MEMDEV_Rotate() rotates memory devices, not bitmaps. The trick is to fill the memory devices with bitmaps and then rotate them.

    The part of the code you are looking for in the MEMDEV_ZoomAndRotate sample resides in the static function _GetImage(). This is where the memory devices get selected and filled with the appropriate bitmap.

    I hope I could help you with this information.

    Best Regards,
    Adrian