Changeset 83 for trunk/Packages/Common/UPixelPointer.pas
- Timestamp:
- Dec 28, 2021, 5:00:37 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/UPixelPointer.pas
r77 r83 15 15 private 16 16 procedure SetRGB(AValue: Cardinal); 17 function GetRGB: Cardinal; 17 18 public 18 function GetRGB: Cardinal;19 19 property RGB: Cardinal read GetRGB write SetRGB; 20 20 case Integer of … … 57 57 function Color32ToPixel32(Color: TColor32): TPixel32; 58 58 function Pixel32ToColor32(Color: TPixel32): TColor32; 59 function Color32ToColor(Color: TColor32): TColor; 60 function ColorToColor32(Color: TColor): TColor32; 59 61 60 62 implementation … … 136 138 var 137 139 SrcPtr, DstPtr: TPixelPointer; 138 SubPtr: TPixelPointer;139 140 X, Y: Integer; 140 141 XX, YY: Integer; … … 281 282 end; 282 283 284 function Color32ToColor(Color: TColor32): TColor; 285 begin 286 Result := ((Color shr 16) and $ff) or (Color and $00ff00) or 287 ((Color and $ff) shl 16); 288 end; 289 290 function ColorToColor32(Color: TColor): TColor32; 291 begin 292 Result := $ff000000 or ((Color shr 16) and $ff) or (Color and $00ff00) or 293 ((Color and $ff) shl 16); 294 end; 295 283 296 function PixelPointer(Bitmap: TRasterImage; BaseX: Integer; 284 297 BaseY: Integer): TPixelPointer;
Note:
See TracChangeset
for help on using the changeset viewer.