570 views
in GUI Development by
Hello. I'm trying to build my own rotary knob with changing filled scale, depending on the current value. Something similar to this one https://designshack.net/images/designs/dark-vintage-knob.jpg The problem is the filling scale. What could be the best way to make it? Thanks.

1 Answer

0 votes
by

Hi,

This look very similar to the "Smart Thermostat"-demo. The only difference that I can see here, from my perspective, is the gradient. The needle of your knob shows the actual value. From minValue to actualValue the gradient is visible. From actualValue to maxValue the background is "dark" (gradient not visible).

One simple way to reach this: Instead of working with the gradient, just grow/shrink the dark-area. This is a visual trick. You display the gradient the entire time in the background and paint over a dark color that fills out the gradient-area from the currentValue (needle position) to the maxValue.

Hope this helps.

Best regards,
Chris

Ask Embedded Wizard - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...