Ignore:
Timestamp:
Apr 6, 2021, 7:39:39 PM (3 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/CevoComponents/UPixelPointer.pas

    r331 r347  
    4646  function PixelPointer(Bitmap: TRasterImage; BaseX: Integer = 0; BaseY: Integer = 0): TPixelPointer; inline;
    4747  function SwapRedBlue(Color: TColor32): TColor32;
     48  function Color32ToColor(Color: TColor32): TColor;
     49  function ColorToColor32(Color: TColor): TColor32;
    4850
    4951implementation
     
    113115end;
    114116
     117function Color32ToColor(Color: TColor32): TColor;
     118begin
     119  Result := ((Color shr 16) and $ff) or (Color and $00ff00) or
     120    ((Color and $ff) shl 16);
     121end;
     122
     123function ColorToColor32(Color: TColor): TColor32;
     124begin
     125  Result := $ff000000 or ((Color shr 16) and $ff) or (Color and $00ff00) or
     126    ((Color and $ff) shl 16);
     127end;
    115128
    116129end.
Note: See TracChangeset for help on using the changeset viewer.