Ignore:
Timestamp:
Apr 16, 2024, 11:43:51 AM (4 weeks ago)
Author:
chronos
Message:
  • Modified: Optimized scaled bitmap drawing.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/DpiControls/NativePixelPointer.pas

    r538 r539  
    3434    function GetPixelB: Byte; inline;
    3535    function GetPixelG: Byte; inline;
    36     function GetPixelPlane(Index: Byte): Byte;
     36    function GetPixelPlane(Index: Byte): Byte; inline;
    3737    function GetPixelR: Byte; inline;
    3838    function GetPixelA: Byte; inline;
    3939    function GetPixelPlanes: TColor32Planes;
    40     function GetPixelRGB: Cardinal;
     40    function GetPixelRGB: Cardinal; inline;
    4141    procedure SetPixelARGB(Value: TColor32); inline;
    4242    procedure SetPixelB(Value: Byte); inline;
    4343    procedure SetPixelG(Value: Byte); inline;
    44     procedure SetPixelPlane(Index: Byte; AValue: Byte);
     44    procedure SetPixelPlane(Index: Byte; AValue: Byte); inline;
    4545    procedure SetPixelR(Value: Byte); inline;
    4646    procedure SetPixelA(Value: Byte); inline;
    47     procedure SetPixelRGB(Value: Cardinal);
     47    procedure SetPixelRGB(Value: Cardinal); inline;
    4848  public
    4949    Base: PPixel32;
     
    106106procedure TPixel32.SetRGB(AValue: Cardinal);
    107107begin
    108   R := (AValue shr 16) and $ff;
    109   G := (AValue shr 8) and $ff;
    110   B := (AValue shr 0) and $ff;
     108  ARGB := (ARGB and $ff000000) or (AValue and $ffffff);
    111109end;
    112110
Note: See TracChangeset for help on using the changeset viewer.