Ignore:
Timestamp:
Dec 22, 2016, 1:20:06 PM (8 years ago)
Author:
chronos
Message:

Generic classes unit renamed to UGGraphics and non generic component like class renamed to UFGraphics.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gbitmap/ColorFormats/UColorGray1.pas

    r21 r23  
    66
    77uses
    8   Classes, SysUtils, Graphics, GImage, GPixmap;
     8  Classes, SysUtils, Graphics, UFGraphics, UGGraphics;
    99
    1010type
     
    2020
    2121  TPixmapGray1 = class(TGPixmapBit<TColorGray1>)
    22     function Gray1ToColor(Value: TColorGray1): Graphics.TColor;
     22    function Gray1ToColor(Value: TColorGray1): TColor;
    2323  end;
    2424
     
    3232  end;
    3333
    34   { TBImageGray1 }
     34  { TBPixmapGray1 }
    3535
    36   TBImageGray1 = class(TBImage)
     36  TBPixmapGray1 = class(TBImage)
    3737  private
    3838    FillCallBack: TGetColorPos;
     
    6464  BitDepth := 1;
    6565  BackendColorClass := TBColorGray1;
    66   BackendImageClass := TBImageGray1;
     66  BackendImageClass := TBPixmapGray1;
    6767  AddChannel('Gray', 0, 1);
    6868end;
     
    7070{ TPixmapGray1 }
    7171
    72 function TPixmapGray1.Gray1ToColor(Value: TColorGray1): Graphics.TColor;
     72function TPixmapGray1.Gray1ToColor(Value: TColorGray1): TColor;
    7373begin
    7474  Value := (Value and $1) * $ff;
     
    9797end;
    9898
    99 { TBImageGray1 }
     99{ TBPixmapGray1 }
    100100
    101 function TBImageGray1.FillGetColor(Position: TPoint): TColorGray1;
     101function TBPixmapGray1.FillGetColor(Position: TPoint): TColorGray1;
    102102begin
    103103  Result := (FillCallBack(Position) as TBColorGray1).Value;
    104104end;
    105105
    106 procedure TBImageGray1.SetSize(AValue: TPoint);
     106procedure TBPixmapGray1.SetSize(AValue: TPoint);
    107107begin
    108108  inherited;
     
    110110end;
    111111
    112 function TBImageGray1.GetPixel(X, Y: Integer): IBColor;
     112function TBPixmapGray1.GetPixel(X, Y: Integer): IBColor;
    113113begin
    114114  Result := TBColorGray1.Create(Pixmap.Pixels[X, Y]);
    115115end;
    116116
    117 procedure TBImageGray1.SetPixel(X, Y: Integer; AValue: IBColor);
     117procedure TBPixmapGray1.SetPixel(X, Y: Integer; AValue: IBColor);
    118118begin
    119119  Pixmap.Pixels[X, Y] := (AValue as TBColorGray1).Value;
    120120end;
    121121
    122 procedure TBImageGray1.Fill(Color: IBColor);
     122procedure TBPixmapGray1.Fill(Color: IBColor);
    123123begin
    124124  if Color is TBColorGray1 then
     
    126126end;
    127127
    128 procedure TBImageGray1.Fill(Func: TGetColorPos);
     128procedure TBPixmapGray1.Fill(Func: TGetColorPos);
    129129begin
    130130  FillCallBack := Func;
     
    132132end;
    133133
    134 procedure TBImageGray1.PaintToCanvas(Canvas: TCanvas);
     134procedure TBPixmapGray1.PaintToCanvas(Canvas: TCanvas);
    135135begin
    136136  Pixmap.PaintToCanvas(Canvas, Pixmap.Gray1ToColor);
    137137end;
    138138
    139 function TBImageGray1.GetDataSize: Integer;
     139function TBPixmapGray1.GetDataSize: Integer;
    140140begin
    141141  Result := Pixmap.GetDataSize;
    142142end;
    143143
    144 constructor TBImageGray1.Create;
     144constructor TBPixmapGray1.Create;
    145145begin
    146146  Pixmap := TPixmapGray1.Create;
     
    148148end;
    149149
    150 destructor TBImageGray1.Destroy;
     150destructor TBPixmapGray1.Destroy;
    151151begin
    152152  FreeAndNil(Pixmap);
Note: See TracChangeset for help on using the changeset viewer.