Bitmap on top in the simulator

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

  • Bitmap on top in the simulator

    Hi there



    I have to simulate a product where the display is not square. The corners of the LCD is covered by the overlay (front of the product) and when using the simulator, the background "product" BMP is drawn first and then the LCD. I then need to "cover" the corners of the LCD with new bitmaps.

    Alternative is to draw it in emWin, but because I use 4 bit gray scale, I cannot use the colors that fits the overlay.



    Is there a way to draw from Microsoft Visual C on top of the emWin "canvas"?

    If not. Is there a way to draw in color eventough the LCD is 4 bit?



    Kind regards, Claus
  • Dear Claus,

    I am not sure if I understand you right. Do you just want to change the layout of your simulation 'device' around the display? If yes, please try using SIM_GUI_UseCustomBitmaps(). This causes the simulation to use the files Device.bmp and Device1.bmp as simulation appearance.

    For further information, please take a look at the chapter 'Simulation' of the emWin documentation.

    Best regards,
    Adrian
  • Dear Adrian



    I use Device.bmp. The problem is, that Device.bmp is behind the display. It is normally okay, but not in my case because the display is not square.



    [img]http://dl.dropbox.com/u/16344715/emwin.png[/img]



    This is showing the left part of the display. You can see I use another color instead of white to emulate the backlight.The white and black "ring" is part of the overlay (front) and that is of course in front of the display in real life. I need to emulate the same in the simulator.

    The best would be if the Device.bmp was in front instead of behind the display. Then the display area should be marked with the same transparrent color as the outer limit.

    I know this is not the case, but I need to find a way around the square limitation.



    Do you understand what I'm trying to do?



    Kind regards, Claus
  • Dear Claus,

    Thank you for posting the image. Now I understand what you would like to do, but unfortunately we do not have a "ready to use" solution your concern.

    I think I would try to get around this the way you already mentioned. I would tell emWin to use more colors (e.g. GUICC_8888 ), so you would be able to draw bitmaps in the corners of the display to complete the ring of the overlay. Please note that in this case emWin would not convert 32bit colors to 4bpp grayscale colors anymore, so there would not be any guarantee for your application to look exactly like it should look on the target hardware.

    In general I do not believe you will run in any problems with this kind of work-around, but please do not hesitate to let me know how it works.

    Best regards,
    Adrian