anchor.diff:    end
   end;
   
  -function RGBTripleTofpgColor(const AColor: TRGBTriple): TfpgColor; deprecated;
  +function RGBTripleTofpgColor(const AColor: TRGBTriple): TfpgColor;
   begin
     Result := AColor.Blue or (AColor.Green shl 8) or (AColor.Red shl 16) or (AColor.Alpha shl 32);
   end;
   
  -function FPColorTofpgColor(const AColor: TFPColor): TfpgColor;
  +function FPColorTofpgColor(const AColor: TFPColor): TfpgColor; deprecated;
   begin
     Result := AColor.Blue or (AColor.Green shl 8) or (AColor.Red shl 16) or (AColor.Alpha shl 32);
   end;
   
  -function fpgGetRed(const AColor: TfpgColor): word;
  +function fpgGetRed(const AColor: TfpgColor): byte;
   var
     c: TfpgColor;
   begin
     c := fpgColorToRGB(AColor);
     // AARRGGBB format
  -  Result := Word((c shr 16) and $FF);
  -end;
  -
  -function fpgGetGreen(const AColor: TfpgColor): word;
  +  Result := (c shr 16) and $FF;
  +end;
  +
  +function fpgGetGreen(const AColor: TfpgColor): byte;
   var
     c: TfpgColor;
   begin
     c := fpgColorToRGB(AColor);
     // AARRGGBB format
  -  Result := Word((c shr 8) and $FF);
  -end;
  -
  -function fpgGetBlue(const AColor: TfpgColor): word;
  +  Result := (c shr 8) and $FF;
  +end;
  +
  +function fpgGetBlue(const AColor: TfpgColor): byte;
   var
     c: TfpgColor;
   begin
     c := fpgColorToRGB(AColor);
     // AARRGGBB format
  -  Result := Word(c and $FF);
  -end;
  -
  -function fpgGetAlpha(const AColor: TfpgColor): word;
  +  Result := c and $FF;
  +end;
  +
  +function fpgGetAlpha(const AColor: TfpgColor): byte;
   var
     c: TfpgColor;
   begin
     c := fpgColorToRGB(AColor);
     // AARRGGBB format
  -  Result := Word((c shr 32) and $FF);
  +  Result := (c shr 24) and $FF;
   end;
   
   function fpgGetAvgColor(const AColor1, AColor2: TfpgColor): TfpgColor;
   var
  -  c1, c2: TFPColor;
  -  avg: TFPColor;
  -begin
  -  c1 := fpgColorToFPColor(AColor1);
  -  c2 := fpgColorToFPColor(AColor2);
  +  c1, c2: TRGBTriple;
  +  avg: TRGBTriple;
  +begin
  +  c1 := fpgColorToRGBTriple(AColor1);
  +  c2 := fpgColorToRGBTriple(AColor2);
     avg.Red   := c1.Red + (c2.Red - c1.Red) div 2;
     avg.Green := c1.Green + (c2.Green - c1.Green) div 2;
     avg.Blue  := c1.Blue + (c2.Blue - c1.Blue) div 2;
     avg.Alpha := c1.Alpha + (c2.Alpha - c1.Alpha) div 2;
  -  Result := FPColorTofpgColor(avg);
  +  Result := RGBTripleTofpgColor(avg);
   end;
   
   function fpgColor(const ARed, AGreen, ABlue: byte): TfpgColor;
  
positive.code: 
  function fpgDarker(const AColor: TfpgColor; APercent: Byte): TfpgColor;
  var
    lColor: TFPColor;
  begin
    lColor.Red := fpgGetRed(AColor);
    lColor.Green := fpgGetGreen(AColor);
  
negative.code:   end  { if/else }
  end;
  
  function fpgColorToRGBTriple(const AColor: TfpgColor): TRGBTriple;
  begin
    with Result do
    begin
  