Browse Source

Update dtthemedgauge.pas Bad Line draw parameter in DrawPointer

When testing out the Themed gauge it would work fine IF you didn't change the default size. If you did the Pointer would be all over the place.

Found a flip parameter in the DrawPointer method that had both points sent to some y values. 

Minor change.
Sandy Ganz 3 months ago
parent
commit
e8d1640ac5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      dtthemedgauge.pas

+ 1 - 1
dtthemedgauge.pas

@@ -246,7 +246,7 @@ begin
   X := origin.CenterPoint.x - Round(PointerSettings.Length * cos((j + Position * 270 / ScaleSettings.Maximum) * Pi / 180));
   Y := origin.CenterPoint.y - Round(PointerSettings.Length * sin((j + Position * 270 / ScaleSettings.Maximum) * Pi / 180));
 
-  FPointerBitmap.DrawLineAntialias(origin.CenterPoint.y, origin.CenterPoint.y, x, y, PointerSettings.Color, PointerSettings.Thickness);
+  FPointerBitmap.DrawLineAntialias(origin.CenterPoint.x, origin.CenterPoint.y, x, y, PointerSettings.Color, PointerSettings.Thickness);
 
   // Draw cap over needle
   FPointerBitmap.EllipseAntialias(origin.CenterPoint.x, origin.CenterPoint.y, PointerCapSettings.Radius, PointerCapSettings.Radius, PointerCapSettings.EdgeColor, 2, ColorToBGRA(PointerCapSettings.FillColor));