Ignore:
Timestamp:
Dec 22, 2016, 1:13:04 PM (8 years ago)
Author:
chronos
Message:
  • Modified: RGB8 related code moved to UColorRGB8 unit.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gbitmap/UPixmapSpecialized.pas

    r21 r22  
    1111  TColorGray16 = Word;
    1212  TColorGray32 = Cardinal;
    13 
    14   { TColorRGB8 }
    15 
    16   TColorRGB8 = record
    17     R: Byte;
    18     B: Byte;
    19     G: Byte;
    20     function Create(R, G, B: Byte): TColorRGB8;
    21   end;
    2213
    2314  { TColorRGB16 }
     
    4031  TPixmapGray32 = class(TGPixmap<TColorGray32>)
    4132    function Gray32ToColor(Value: TColorGray32): TColor;
    42   end;
    43 
    44   TPixmapRGB8 = class(TGPixmap<TColorRGB8>)
    45     function RGB8ToColor(Value: TColorRGB8): TColor;
    4633  end;
    4734
     
    6855end;
    6956
    70 { TColorRGB8 }
    71 
    72 function TColorRGB8.Create(R, G, B: Byte): TColorRGB8;
    73 begin
    74   Result.R := R;
    75   Result.G := G;
    76   Result.B := B;
    77 end;
    78 
    7957function TPixmapGray16.Gray16ToColor(Value: TColorGray16): TColor;
    8058begin
     
    8765  Value := (Value shr 24) and $ff;
    8866  Result := (Value shl 16) or (Value shl 8) or (Value shl 0);
    89 end;
    90 
    91 function TPixmapRGB8.RGB8ToColor(Value: TColorRGB8): TColor;
    92 begin
    93   Result := (Value.R shl 16) or (Value.G shl 8) or (Value.B shl 0);
    9467end;
    9568
Note: See TracChangeset for help on using the changeset viewer.