diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-03-19 11:47:47 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-03-19 11:47:47 +0200 |
commit | f6fe14a02b2b8830e6927f8dfb11a5f4216426b9 (patch) | |
tree | fa86ea9940fdba0a9efd68a1c48dcf6b905c54fc /src | |
parent | 74a6e0a4f69a006da09327322ccfd76c002e1c05 (diff) | |
download | fpGUI-f6fe14a02b2b8830e6927f8dfb11a5f4216426b9.tar.xz |
Removed deprecated TFPColor usage.
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/fpg_base.pas | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/fpg_base.pas b/src/corelib/fpg_base.pas index a0cc7690..34b14d45 100644 --- a/src/corelib/fpg_base.pas +++ b/src/corelib/fpg_base.pas @@ -1710,15 +1710,15 @@ end; procedure TfpgCanvasBase.GradientFill(ARect: TfpgRect; AStart, AStop: TfpgColor; ADirection: TGradientDirection); var - RGBStart: TFPColor; - RGBStop: TFPColor; + RGBStart: TRGBTriple; + RGBStop: TRGBTriple; RDiff, GDiff, BDiff: Integer; count: Integer; i: Integer; - newcolor: TFPColor; + newcolor: TRGBTriple; begin - RGBStart := fpgColorToFPColor(fpgColorToRGB(AStart)); - RGBStop := fpgColorToFPColor(fpgColorToRGB(AStop)); + RGBStart := fpgColorToRGBTriple(AStart); + RGBStop := fpgColorToRGBTriple(AStop); if ADirection = gdVertical then count := ARect.Bottom - ARect.Top @@ -1735,7 +1735,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; - SetColor(FPColorTofpgColor(newcolor)); + SetColor(RGBTripleTofpgColor(newcolor)); // We have to overshoot by 1 pixel as DrawLine paints 1 pixel short (by design) if ADirection = gdHorizontal then |