Problem withe memdev rotate function

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

  • Problem withe memdev rotate function

    Hello I am using segger emwin library. I have a
    problem with rotate function. I searched in segger forum but not got the
    answer. I am creating Source and destination memory device. I am copying source
    pointer using get data pointer function to a buffer. After rendering image to memory
    device I am going to take destination pointer in the buffer and rotating
    the image using memdev rotate function and then copying to display
    buffer. But after rotate function nothing is there in the display buffer.
    I am stuck at this point because I am new to graphic LCD. I am attaching a code snippet. Hope you will get the
    question properly.

    Regards
    Amey Bhopi


    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:none;
    mso-hyphenate:none;
    punctuation-wrap:simple;
    text-autospace:none;
    font-size:11.0pt;
    font-family:"Calibri",sans-serif;
    mso-font-kerning:1.5pt;}



    unsigned int memdev_width = 640;

    unsigned int memdev_height = 480;

    getImgAttrib(img_buf_ptr, &img_width,
    &img_height);

    hSrc=GUI_MEMDEV_Create(x0,y0,img_width,img_height);

    hDst=GUI_MEMDEV_Create(0,0,memdev_width,memdev_height);

    if(bitmap < (image_property->hdr.hdr_desc[1].num_present))

    {

    orig_pres_buff = (unsigned int *)GUI_MEMDEV_GetDataPtr(hSrc);

    img_buf_ptr = (unsigned char*)
    (readBuffer+imgOffset[bitmap]+image_property->hdr.header_size+0);

    RenderCompactBMP(img_buf_ptr,0,0, img_width);




    orig_pres_buff = (unsigned int *)GUI_MEMDEV_GetDataPtr(hDst);

    GUI_MEMDEV_Rotate(hSrc,
    hDst, 20, 20, 30*1000,1000);

    memcpy(new_buff, orig_pres_buff,
    (memdev_width*memdev_height*4));

    }

    [/code]
    Files

    The post was edited 1 time, last by SEGGER - Adrian ().