Changeset 442 for GraphicTest/UFastBitmap.pas
- Timestamp:
- Nov 22, 2012, 9:37:20 AM (12 years ago)
- Location:
- GraphicTest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest
- Property svn:ignore
-
old new 7 7 GraphicTest.rc 8 8 GraphicTest.lps 9 GraphicTest.dbg
-
- Property svn:ignore
-
GraphicTest/UFastBitmap.pas
r356 r442 10 10 type 11 11 12 TFastBitmapPixel = Integer;12 TFastBitmapPixel = Cardinal; 13 13 (*TFastBitmapPixel = record 14 14 Blue: Byte; … … 70 70 end; 71 71 72 function SwapBRComponent(Value: Integer): Integer; inline;73 function NoSwapBRComponent(Value: Integer): Integer; inline;72 function SwapBRComponent(Value: Cardinal): Cardinal; inline; 73 function NoSwapBRComponent(Value: Cardinal): Cardinal; inline; 74 74 75 75 implementation 76 76 77 function SwapBRComponent(Value: Integer): Integer;77 function SwapBRComponent(Value: Cardinal): Cardinal; 78 78 begin 79 79 // Result := (Value and $00ff00) or ((Value shr 16) and $ff) or ((Value and $ff) shl 16); … … 83 83 end; 84 84 85 function NoSwapBRComponent(Value: Integer): Integer;85 function NoSwapBRComponent(Value: Cardinal): Cardinal; 86 86 begin 87 87 // Result := (Value and $00ff00) or ((Value shr 16) and $ff) or ((Value and $ff) shl 16); … … 211 211 for Y := 0 to (Size.Y div 2) - 1 do 212 212 for X := 0 to (Size.X div 3) - 1 do 213 Pixels[X + (I * (Size.X div 3)), Y] := 255 shl (I * 8);213 Pixels[X + (I * (Size.X div 3)), Y] := (255 shl (I * 8)) and $ffffff; 214 214 215 215 for Y := (Size.Y div 2) to Size.Y - 1 do 216 216 for X := 0 to Size.X - 1 do 217 Pixels[X, Y] := Random(256) or (Random(256) shl 16) or (Random(256) shl 8);217 Pixels[X, Y] := (Random(256) or (Random(256) shl 16) or (Random(256) shl 8)) and $ffffff; 218 218 end; 219 219
Note:
See TracChangeset
for help on using the changeset viewer.