Ignore:
Timestamp:
Jun 14, 2024, 9:37:37 PM (5 months ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Common/PixelPointer.pas

    r570 r571  
    1818    function GetRGB: Cardinal; inline;
    1919  public
     20    class function CreateRGB(R, G, B: Byte): TPixel32; static;
     21    class function CreateRGBA(R, G, B, A: Byte): TPixel32; static;
    2022    property RGB: Cardinal read GetRGB write SetRGB;
    2123    case Integer of
     
    104106end;
    105107
     108class function TPixel32.CreateRGB(R, G, B: Byte): TPixel32;
     109begin
     110  Result.R := R;
     111  Result.G := G;
     112  Result.B := B;
     113  Result.A := 0;
     114end;
     115
     116class function TPixel32.CreateRGBA(R, G, B, A: Byte): TPixel32;
     117begin
     118  Result.R := R;
     119  Result.G := G;
     120  Result.B := B;
     121  Result.A := A;
     122end;
     123
    106124procedure TPixel32.SetRGB(AValue: Cardinal);
    107125begin
Note: See TracChangeset for help on using the changeset viewer.