Circular Gradient

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

    • Circular Gradient


      I wanted to draw a circular grey gradient as showing in the attached image. The dial is used for showing temperature value and an arrow will be displayed indicating the temperature. The angle of gradient will change depending on temperature value. Is there any way this can be achieved in Emwin?



      • 1.png

        16.01 kB, 411×411, viewed 76 times
    • Hi Florian,

      Thanks for the example. It is working. If i want to show an arrow as attached in the image below will i have to include the arrow in the image itself which shows the temperature value or arrow can be drawn separately.

      The final image is attached which i want to achieve. The outer ring is dynamic and inner light green arc is dynamic and will change on temperature value. I believe if i use the knob widget then how will i draw the arrow, outer ring and inner light green arc.


      • Setpoint1.png

        27.14 kB, 411×411, viewed 34 times
    • Hi Anuj,

      you can draw the arrow separately, but I suppose it is just easier to add it to the bitmap instead of having to calculate the arrow position via the KNOB value.
      The colored circle/arc around your KNOB can be drawn with GUI_DrawCircle() and GUI_DrawArc(), respectively.

      Best regards,

    • Hello,

      As you can see the above image Setpoint1.png, I wanted to rotate the inner knob (Black colored) using touch and the green arc color should be updated based on the knob movement.

      But I am facing issues while rotating the knob, the outer arc gets corrupted first and then it starts drawing the arc according to knob moment.

      • Step2.PNG

        15.35 kB, 338×308, viewed 18 times
      • Step1.PNG

        15.49 kB, 367×309, viewed 10 times

        (27.08 kB, downloaded 18 times, last: )