Hello!
I'm working on my first "visible" gauge! Still beginning in GDI+ trying to get used to the coordinates and using SetClip etc.
I'm using C# for now, just to get the actual drawing done correctly, it will then of course be ported to C++ for the actual gauge. (Easier than recompiling all the time
)
One thing that I'm trying to rack my head around, is the airspeed indicator. Working off the PFD image, the marker for every 10 knots is 25px (Y Axis).
As the IAS increases the bar will move down to level with the altitude bar, I've worked out the approx coordinates are:
Top: X = 44 Y = 80
Mid: X = 44 Y = 174
Bot: X = 44 Y = 268
Line length = 188 px
40 Knots marker: X = 44 Y = 149 (From 0) then next: X = 44 Y = 124 (Difference between markers is Y = 25 px)
So I will need to setup a Clip or perhaps a Region, to cut off any off screen values when it scrolls through the range.
What would be the best method to get the speed working? Pseudo code or just a general direction would be amazing!
I'm assuming (late at night :/) that I will have to work out and draw the little "ticks" every ten knots, and then translate the text up/down respectively?
Go easy on me :O!
Many Thanks!
I'm working on my first "visible" gauge! Still beginning in GDI+ trying to get used to the coordinates and using SetClip etc.
I'm using C# for now, just to get the actual drawing done correctly, it will then of course be ported to C++ for the actual gauge. (Easier than recompiling all the time
One thing that I'm trying to rack my head around, is the airspeed indicator. Working off the PFD image, the marker for every 10 knots is 25px (Y Axis).
As the IAS increases the bar will move down to level with the altitude bar, I've worked out the approx coordinates are:
Top: X = 44 Y = 80
Mid: X = 44 Y = 174
Bot: X = 44 Y = 268
Line length = 188 px
40 Knots marker: X = 44 Y = 149 (From 0) then next: X = 44 Y = 124 (Difference between markers is Y = 25 px)
So I will need to setup a Clip or perhaps a Region, to cut off any off screen values when it scrolls through the range.
What would be the best method to get the speed working? Pseudo code or just a general direction would be amazing!
I'm assuming (late at night :/) that I will have to work out and draw the little "ticks" every ten knots, and then translate the text up/down respectively?
Go easy on me :O!
Many Thanks!



