No announcement yet.

Help - gfx_Transparency

  • Filter
  • Time
  • Show
Clear All
new posts

  • Help - gfx_Transparency


    I need your help guys.
    in this Example:;v=w1PCTq9H3Dw
    0:37 ~0:50s

    I want to copy this function. how can i use that transparency dropdown menu AND update data behind it.

    First question:

    How i get exactly hexa code for colour of image? because if i use pick colour in paint, when i transfer image to workshop (Visi) the colour change a little.
    At now im using Display.gfx_GetPixel(x,y); is it the best way?


    How update BEHIND the image?its only possible with images? or can i update a obj like triangle, square, lines?

    I was reading many topics in this forum, and i think i have to use something like ClipWindow and background image. (Maybe: file_ScreenCapture?)

    But i dont found nothing about how to set background image on Serial.(Edit: I think this do not the concept to serial mode right?)

    Im really interesting in understand that animation on video, but i need to do all by Serial Mode. I use a host to control the lcd in my project.

    gen4 50DCT
    PmmC 2.0
    Last edited by lucas4m4; 18 October 2017, 01:44 AM.

  • #2
    Good day lucas4m4,

    First question:

    Yes the gfx_getPixel is the best way to get the colour from an image running on the display. There may be discrepancy in the colors because the colors in the display module is 16-bit only.

    Second question:

    The video that you saw was not really updating behind another object. The drop down menu and the gauge is compiled into one image/images.

    The display modules animation work by placing the image on top of another. Take note that the images have already transparent backgrounds from their desired image editor "Photoshop, GIMP, etc" which makes an illusion of transparency. The transparency is already achieved on the image itself. If the objects are on top of each other, the one that is being updated will "move up"and cover the previous one, and so on and so forth.

    We eliminated that issue by making the Smart Widgets, where 2 or more are objects compiled into one then a large number of frames are created. The desired frame will be accessed through a certain value mathematically based on the number of objects/layers inside the smart widget. So when you touch the widget, a code formula will be executed and show which is the desired frame.

    In the video you showed, they are specifically using Smart Widgets for PRO version of the Workshop 4 IDE. To perform this in a free version of the Workshop 4 IDE, you must need to manually create lots of amount of possible frames. For example, your gauge value is 20 (20 of 100) and the state of the drop down box is opened and selecting yellow (3 out of 4), therefore you need to create each and every possible frame. Then use a userimage to show which image you want.