summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/gui/colorwheel/frm_main.pas8
-rw-r--r--prototypes/fpgui2/tests/frm_threedee.pas12
2 files changed, 10 insertions, 10 deletions
diff --git a/examples/gui/colorwheel/frm_main.pas b/examples/gui/colorwheel/frm_main.pas
index 3633b740..63518360 100644
--- a/examples/gui/colorwheel/frm_main.pas
+++ b/examples/gui/colorwheel/frm_main.pas
@@ -67,14 +67,14 @@ end;
procedure TMainForm.RGBChanged(Sender: TObject);
var
- rgb: TRGBTriple;
+ rgb: TFPColor;
c: TfpgColor;
begin
FViaRGB := True; // revent recursive updates
rgb.Red := StrToInt(edR.Text);
rgb.Green := StrToInt(edG.Text);
rgb.Blue := StrToInt(edB.Text);
- c := RGBTripleTofpgColor(rgb);
+ c := FPColorTofpgColor(rgb);
ColorWheel1.SetSelectedColor(c); // This will trigger ColorWheel and ValueBar OnChange event
FViaRGB := False;
end;
@@ -122,11 +122,11 @@ end;
procedure TMainForm.UpdateRGBComponents;
var
- rgb: TRGBTriple;
+ rgb: TFPColor;
c: TfpgColor;
begin
c := ValueBar1.SelectedColor;
- rgb := fpgColorToRGBTriple(c);
+ rgb := fpgColorToFPColor(c);
edR.Text := IntToStr(rgb.Red);
edG.Text := IntToStr(rgb.Green);
edB.Text := IntToStr(rgb.Blue);
diff --git a/prototypes/fpgui2/tests/frm_threedee.pas b/prototypes/fpgui2/tests/frm_threedee.pas
index 836de485..5f6548ed 100644
--- a/prototypes/fpgui2/tests/frm_threedee.pas
+++ b/prototypes/fpgui2/tests/frm_threedee.pas
@@ -119,18 +119,18 @@ Const
procedure FillRectGradient(Canvas: TfpgCanvas; X, Y, W, H: TfpgCoord;
Strip: Integer; Astart, Astop: TfpgColor);
var
- RGBStart: TRGBTriple;
- RGBStop: TRGBTriple;
+ RGBStart: TFPColor;
+ RGBStop: TFPColor;
RDiff, GDiff, BDiff: Integer;
count: Integer;
i: Integer;
- newcolor: TRGBTriple;
+ newcolor: TFPColor;
Hx, Hy: TfpgCoord; // Coordinates for Horizontal Lines
Vx, Vy: TfpgCoord; // Coordinates for Vertical Lines
avgcolor: TfpgColor;
begin
- RGBStart := fpgColorToRGBTriple(fpgColorToRGB(AStart));
- RGBStop := fpgColorToRGBTriple(fpgColorToRGB(AStop));
+ RGBStart := fpgColorToFPColor(fpgColorToRGB(AStart));
+ RGBStop := fpgColorToFPColor(fpgColorToRGB(AStop));
count := Strip;
Hx := X;
@@ -151,7 +151,7 @@ begin
newcolor.Blue := RGBStart.Blue + (i * BDiff) div count;
Canvas.SetLineStyle(1, lsSolid);
- Canvas.SetColor(RGBTripleTofpgColor(newcolor));
+ Canvas.SetColor(FPColorTofpgColor(newcolor));
Canvas.DrawLine(Hx, Hy, W+2, Hy); // Horizontal Line
Canvas.DrawLine(Vx, Vy, Vx, H+2); // Vertical Line
// next Horizontal Line: one pixel lower, one pixel shorter on the left