2020-01-28 09:04 PM
2020-01-28 10:49 PM
I believe you need to start with a bitmap of your gauge face that has no ticks or texts, then add these items yourself. I added a second needle to the gauge by using the existing code as a guide.
did you want the ticks to be variable, externally controlled?
Bob
2020-01-28 10:59 PM
Hello Bob,
Thank you for your response. i have already implemented the gauge face using custom container having circular progress bar and a circle, i need to populate variable no. of ticks and numeric value corresponding to it based on for which purpose the gauge is used. can you please let me know how i can draw point / pixel wise and generate the text like we can do in emwin using GUI_DrawPoint, GUI_DispStringHCenterAt.
does touchgfx has api similar to that above?
2020-01-28 10:59 PM
Hello Bob,
Thank you for your response. i have already implemented the gauge face using custom container having circular progress bar and a circle, i need to populate variable no. of ticks and numeric value corresponding to it based on for which purpose the gauge is used. can you please let me know how i can draw point / pixel wise and generate the text like we can do in emwin using GUI_DrawPoint, GUI_DispStringHCenterAt.
does touchgfx has api similar to that above?
2020-01-28 11:09 PM
I've not used emWin, but it did seem to have more of these user functions built in.
in our case we need to add them
another user on here was doing custom gauge stuff (Jim Fouch?), he posted a small snippet and I remember
his ticks were drawn as shapes similar to how the needle is drawn.
draw a tick at 0 degrees (straight up), with its center at the center of your gauge, then rotate it to where you want it, and then add. do this in a loop based on how many ticks.
for the text I would add text+wildcard items where you want the labels,
Bob
2020-01-29 12:11 AM
thanks i will try the same.