Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arc Start Angle % issue in Circular Gauge Widget #29

Open
Elpra-Bozas opened this issue Nov 17, 2022 · 5 comments
Open

Arc Start Angle % issue in Circular Gauge Widget #29

Elpra-Bozas opened this issue Nov 17, 2022 · 5 comments

Comments

@Elpra-Bozas
Copy link

I am using a circular gauge and using multiple arcs to represent different regions. I noticed that an arc with a start angle % that corresponds to the gauge's start angle 0 cannot be rendered. For example if I set a gauge with start angle -135 and Center angle -270 and add an arc to that gauge with an End Angle 100%, when the start angle goes above 83% (corresponds to gauge's start angle 0), the arc region is not drawn. Everything works OK in the region[ 0->83%, 100% ], but fails to render in the region [ 84->99%, 100% ]
image

@manolisss
Copy link

Hello,
Any news on this issue @microchip-gfx ?

@microchip-gfx
Copy link
Contributor

This has been logged as a bug and will be addressed in the next release.

@manolisss
Copy link

This has been logged as a bug and will be addressed in the next release.

Do you any idea when the new release is coming out?

@MHGC
Copy link
Contributor

MHGC commented Nov 30, 2022

gfx-v3.12.0 is tentatively targeted for mid-December

@microchip-gfx
Copy link
Contributor

Can you try this modification and see if it fixes the issue?

In legato_math.c, line 613 add:

else if(startAngle < -360)
    {
        while(startAngle < -360)
        {
            startAngle += 360;
        }
    }

as an addition case to the if statement:

if(startAngle > 360)
    {
        startAngle %= 360;
    }

I think what was happening was that the algorithm wasn't properly resolving start angles that were < -360 degrees. The start angle always needs to be recast into the range -2pi and 2pi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants