summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/fpg_base.pas12
-rw-r--r--src/gui/fpg_gauge.pas12
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;