Circular Gradient

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

    • Circular Gradient

      Hello,

      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?

      Thanks

      Regards,

      Anuj
      Images
      • 1.png

        16.01 kB, 411×411, viewed 77 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.

      Regards,

      Anuj
      Images
      • Setpoint1.png

        27.14 kB, 411×411, viewed 35 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,

      Florian
    • 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.

      Regards,
      Anuj
      Images
      • Step2.PNG

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

        15.49 kB, 367×309, viewed 11 times
      Files
      • Dial_Issue.zip

        (27.08 kB, downloaded 19 times, last: )