463 views
in GUI Development by

Hi !

I am new to embedded wizard and I am making a new project.

Refer to the picture below, now, when the value of gauge widget  is changed, it will update the whole screen, and cause a little bit chopping when changing is frequently.

Is there any way to tell embedded wizard to only update a specific rectangular area on the display.  In my case, I mean the display area that changed when the gauge widget value changes.

In this way I can improve the performance and avoid the chopping.

image.png

Thank you!

 

 

1 Answer

0 votes
by
Hi John,

of course, Embedded Wizard takes care to update only the "dirty area".

Unfortunately, your image is not uploaded - so I cannot comment further. Can you please upload the image?

Thanks and best regards,

Manfred.
by

Hi Manfred:

I hope you can see the picture now.  

Look at the green area, it is being updated, even the gauge widget just has small different compare to the previous frame.

Could you please give me any idea to control it?

by

Hi John,

I assume that the gauge contains a Stroked Path in order to draw the circular indicator. Furthermore, I assume that the Bounds of the Stroked Path covers the complete screen. 

As soon as the Path Data changes (due to a new value of the gauge) the vector graphics has to be processed and the Stroked Path view has to be redrawn. The Bounds of the Stroked Path determines the dirty area. In your application case, the Stroked Path seems to cover the complete screen.

Best regards,

Manfred.

by
So could you please give me some instruction on how to avoid it?

Is there other method can achieve same function, and have better performance? I am thinking divide the Stroked Path into 2 or more, do you think this is a feasible way?
by
Maybe you can describe or show the problem that you have when the value of the gauge changes.

What target are you using? How often does the value change? How does it appear on the target?
by
I am using ESP32.

The problem is the display which I am using is using SPI interface, it can’t refresh very fast, if the gauge need to update the whole display every time the value changed, the display will seems not very smooth,  so I want to reduce the refresh area to improve the performance.

I need the gauge be smooth when it quickly jumps from one side to another side.
by
Hi Manfred,

Your suggestions is important to me,.

Could you please tell me is it possible to tell embedded wizard only update a specific area of widget instead of whole area of widget.

Or equivalently, can we invoke a user-defined refreshing, just tell embedded wizard to refresh a rectangular area(dummy refreshing)?
by
Hi John,

there is no additional way to limit the dirty area of a GUI component. Due to the fact that the Path Data is changing, the Stroked Path view has to be redrawn.

In order to reduce the update area, you can split the gauge into four quarters and calculate the arc path data by yourself. Only when the start / end angle within a quarter changes, it has to be redrawn. Furthermore, you can reduce the Bounds area of the gauge to the necessary minimum, so that the update area is reduced (e.g. in the bottom area where the navigation is shown).

Does this help?

Best regards,

Manfred.
by

Hi Manfred,

Thank you for your help.

I find that there is a method called  InvalidateArea(arg rect aArea) seems can be used to tell embedded wizard which area need to be updated. Refer to the picture below.

 

I use this method, and disable the gauge widget self-updating, now everything seems fine. Do you think is there any other things need to be considered?

 

by
Hi,

the method InvalidateArea() can be used to invalidate explicitly an area and force an update. However, as soon as you change the path data, all views using the path data will be invalidated automatically.

If you disable the gauge widget self-updating, you hook somehow into the automatic invalidation and take the responsibility of calculating the invalid area. I believe it will work for your application use-case.

Best regards,

Manfred.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...