diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-11-30 16:01:47 +0000 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-11-30 16:01:47 +0000 |
commit | 269d14b00140f054b182b8805756d994f5e9d828 (patch) | |
tree | 2cce2c7d7bb507e93aab2234141c62d351f007e7 /src | |
parent | ff06e4037e8bc6daff07393c01f6a134f2293a62 (diff) | |
download | fpGUI-269d14b00140f054b182b8805756d994f5e9d828.tar.xz |
Fixes compiler warning about using a deprecated type... TFPColor
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/fpg_base.pas | 12 | ||||
-rw-r--r-- | src/gui/fpg_gauge.pas | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/corelib/fpg_base.pas b/src/corelib/fpg_base.pas index 68b81311..3eae947a 100644 --- a/src/corelib/fpg_base.pas +++ b/src/corelib/fpg_base.pas @@ -1959,7 +1959,7 @@ var contributions: array[0..10] of TfpgInterpolationContribution; dif, w, gamma, a: double; c: TfpgColor; - rgb: TFPColor; + rgb: TRGBTriple; begin for x := 0 to Width - 1 do begin @@ -2003,7 +2003,7 @@ begin with contributions[r] do begin c := image.colors[place, y]; - rgb := fpgColorToFPColor(c); + rgb := fpgColorToRGBTriple(c); a := weight; // * rgb.Alpha / $FFFF; re := re + a * rgb.Red; gr := gr + a * rgb.Green; @@ -2017,7 +2017,7 @@ begin blue := ColorRound(bl); // alpha := ColorRound(gamma * $FFFF); end; - tempimage.colors[x, y] := FPColorTofpgColor(rgb); + tempimage.colors[x, y] := RGBTripleTofpgColor(rgb); end; end; end; @@ -2030,7 +2030,7 @@ var contributions: array[0..10] of TfpgInterpolationContribution; dif, w, gamma, a: double; c: TfpgColor; - rgb: TFPColor; + rgb: TRGBTriple; begin for y := 0 to Height - 1 do begin @@ -2074,7 +2074,7 @@ begin with contributions[r] do begin c := tempimage.colors[x, place]; - rgb := fpgColorToFPColor(c); + rgb := fpgColorToRGBTriple(c); a := weight;// * rgb.alpha / $FFFF; re := re + a * rgb.red; gr := gr + a * rgb.green; @@ -2088,7 +2088,7 @@ begin blue := ColorRound(bl); // alpha := ColorRound(gamma * $FFFF); end; - Canvas.Pixels[x + dx, y + dy] := FPColorTofpgColor(rgb); + Canvas.Pixels[x + dx, y + dy] := RGBTripleTofpgColor(rgb); end; end; end; diff --git a/src/gui/fpg_gauge.pas b/src/gui/fpg_gauge.pas index e980c817..2b947442 100644 --- a/src/gui/fpg_gauge.pas +++ b/src/gui/fpg_gauge.pas @@ -127,12 +127,12 @@ uses to be moved in CanvasBase? } procedure FillArcGradient(canvas: TfpgCanvas; X,Y,W,H: TfpgCoord; a1,a2: double; Astart,Astop: TfpgColor); var - RGBStart: TFPColor; - RGBStop: TFPColor; + RGBStart: TRGBTriple; + RGBStop: TRGBTriple; RDiff, GDiff, BDiff: Integer; count: Integer; i: Integer; - newcolor: TFPColor; + newcolor: TRGBTriple; begin if Astart = Astop then begin { No gradient, just solid color} @@ -141,8 +141,8 @@ begin Exit; //==> end; - RGBStart := fpgColorToFPColor(fpgColorToRGB(AStart)); - RGBStop := fpgColorToFPColor(fpgColorToRGB(AStop)); + RGBStart := fpgColorToRGBTriple(fpgColorToRGB(AStart)); + RGBStop := fpgColorToRGBTriple(fpgColorToRGB(AStop)); count := min(H,W); count := count div 2; @@ -168,7 +168,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(FPColorTofpgColor(newcolor)); + canvas.SetColor(RGBTripleTofpgColor(newcolor)); canvas.DrawArc(X, Y, W, H, a1, a2); end; end; |