Ignore:
Timestamp:
Dec 22, 2016, 5:35:25 PM (8 years ago)
Author:
chronos
Message:
  • Modified: Use faster drawing to TBitmap RawImage.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/FastGraphics/ColorFormats/UColorRGB8.pas

    r26 r27  
    5454    procedure PaintToCanvas(Canvas: TCanvas); override;
    5555    procedure PaintToCanvas(Canvas: TCanvas; Rect: TRect); override;
     56    procedure PaintToBitmap(Bitmap: TBitmap; Rect: TRect); override;
    5657    procedure LoadFromCanvas(Canvas: TCanvas); override;
    5758    function GetDataSize: Integer; override;
     
    9192function TPixmapRGB8.RGB8ToColor(Value: TColorRGB8): TColor;
    9293begin
    93   Result := (Value.R shl 16) or (Value.G shl 8) or (Value.B shl 0);
     94  Result := (Value.B shl 16) or (Value.G shl 8) or (Value.R shl 0);
    9495end;
    9596
     
    159160end;
    160161
     162procedure TBPixmapRGB8.PaintToBitmap(Bitmap: TBitmap; Rect: TRect);
     163begin
     164  Pixmap.PaintToBitmap(Bitmap, Rect, Pixmap.RGB8ToColor);
     165end;
     166
    161167procedure TBPixmapRGB8.LoadFromCanvas(Canvas: TCanvas);
    162168begin
Note: See TracChangeset for help on using the changeset viewer.