diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-04-29 10:56:45 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-04-29 10:56:45 +0200 |
commit | 2bc72af1ccadad45bbc07b81cb22fe1b7ec01252 (patch) | |
tree | a0f45bacdebafed40ddcab872d4292966e5a0024 /src/gui/fpg_gauge.pas | |
parent | 8c67847e50cb1b2f9fd5ffdc59f2309ab05bd4a5 (diff) | |
download | fpGUI-2bc72af1ccadad45bbc07b81cb22fe1b7ec01252.tar.xz |
TRGBTriple conflicts with a declaration in the Windows unit.
* I introduced a new record type TFPColor (same as the declaration
in the FPImage unit. I also introduced new conversion functions
that work with TFPColor.
* I marked the TRGBTriple type as deprecated.
* I replaced all TRGBTriple usage with TFPColor.
Diffstat (limited to 'src/gui/fpg_gauge.pas')
-rw-r--r-- | src/gui/fpg_gauge.pas | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/fpg_gauge.pas b/src/gui/fpg_gauge.pas index 2236e912..37a154c6 100644 --- a/src/gui/fpg_gauge.pas +++ b/src/gui/fpg_gauge.pas @@ -115,22 +115,22 @@ uses to be moved in CanvasBase? } procedure FillArcGradient(canvas: TfpgCanvas; X,Y,W,H: TfpgCoord; a1,a2: double; Astart,Astop: TfpgColor); var - RGBStart: TRGBTriple; - RGBStop: TRGBTriple; + RGBStart: TFPColor; + RGBStop: TFPColor; RDiff, GDiff, BDiff: Integer; count: Integer; i: Integer; - newcolor: TRGBTriple; + newcolor: TFPColor; begin - if Astart = Astop then + if Astart = Astop then begin { No gradient, just solid color} canvas.SetColor(Astart); canvas.FillArc(X, Y, W, H, a1, a2); Exit; //==> end; - RGBStart := fpgColorToRGBTriple(fpgColorToRGB(AStart)); - RGBStop := fpgColorToRGBTriple(fpgColorToRGB(AStop)); + RGBStart := fpgColorToFPColor(fpgColorToRGB(AStart)); + RGBStop := fpgColorToFPColor(fpgColorToRGB(AStop)); count := min(H,W); count := count div 2; @@ -156,7 +156,7 @@ begin newcolor.Red := RGBStart.Red + (i * RDiff) div count; newcolor.Green := RGBStart.Green + (i * GDiff) div count; newcolor.Blue := RGBStart.Blue + (i * BDiff) div count; - canvas.SetColor(RGBTripleTofpgColor(newcolor)); + canvas.SetColor(FPColorTofpgColor(newcolor)); canvas.DrawArc(X, Y, W, H, a1, a2); end; end; |