How can I fill desktop with one image

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

  • How can I fill desktop with one image

    Hi
    I want to fill the desktop with one image as background picture.
    I use this code now ,but it is slow.

    C Source Code

    1. case WM_PAINT:
    2. /*
    3. * Draw background and toucan
    4. */
    5. for(i=0;i<10;i++)
    6. for(j=0;j<7;j++)
    7. GUI_DrawBitmap(&bmbc1, i*80, j*68);
    8. break;


    After some studying, I use Bitmap converter and set the "Tiled background" in "Option" menu. but only one picture is drawn.

    What can I do for Tiled background?

    Regards
    Hamed
  • Hi
    There is one problem

    Now, the lines and text that I draw on the screen places in the behind of image.

    Its the code of line and text

    C Source Code

    1. case WM_PAINT:
    2. /*
    3. * Draw background and toucan
    4. */
    5. xSize = LCD_GetXSize();
    6. ySize = LCD_GetYSize();
    7. GUI_SetColor(GUI_WHITE);
    8. GUI_SetTextMode(GUI_TM_TRANS);
    9. GUI_DrawGradientV(0, 0, xSize, ySize, GUI_MAKE_COLOR(0xFF8080), GUI_MAKE_COLOR(0x8080FF));
    10. GUI_SetFont(GUI_FONT_16_ASCII);
    11. GUI_DispStringHCenterAt("emWin now supports\n", xSize / 2, 5);
    12. GUI_DispStringHCenterAt("S k i n n i n g", xSize / 2, GUI_GetDispPosY());
    13. GUI_SetColor(GUI_RED);
    14. GUI_FillRoundedRect(xpos,ypos,width,height,30);
    15. GUI_SetColor(GUI_BLACK);
    16. GUI_DrawVLine(700,20,450);
    17. break;
    Display All

    What can I do?

    Regards