542 views
in GUI Development by
I need to create a widget for a gauge that sign the value filling the widget with a predefined color or bitmap. The gauge should have a custom form, so it won't be a circle or a rectangle. I tried to do it with a Warp Image, but it just rescale the full bitmap in the area instead of drawing just the visible part.

 

Thanks in advance.

1 Answer

0 votes
by

Hi!

Without knowing the desired appearance of your gauge, I can just give you some general ideas...

Typically, the background is a normal Image - only the needle is drawn by an WarpImage to make the rotation.

Please have a look into the example 'AviationDemo' - it shows the implementation of different analog instruments with different appearance and behavior.

Does this help for your use-case?

Best regards,

Manfred.

by
Hello!

Thanks for your answer.

I've already created the needle for the gauge, but i would like to improve graphic visualization adding into the gauge a filling bar like a classic progress bar. My gauge is a circle arc with values that change from -X to +X. For example, if I have a value of +10 with a max value of +20, i would fill the gauge from the center to the current value.

I tried also the outline component, but it works just for linear progress bar.

I hope i could explain myself.
by
Hi. Filling a gauge dynamically is a little bit tricky - you can find an implementation within the Charts::PieChart or within Flat::AnalogDisplay. Is that what you are looking for?

If your gauge is very specific - is it possible to share your design? Then it will be easier to give you helpful advices. If you are using Professional Edition of Embedded Wizard you can contact us via support@embedded-wizard.de to keep confidentiality.
by
Hi.

i have resolved following the implementation from Charts::PieChart

Thank you for your support.

Embedded Wizard Website | Privacy Policy | Imprint

...