Changeset 11 for trunk/Forms
- Timestamp:
- Aug 29, 2016, 6:09:30 PM (8 years ago)
- Location:
- trunk/Forms
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.lfm
r10 r11 56 56 end 57 57 object Timer1: TTimer 58 Interval = 5058 Interval = 10 59 59 OnTimer = Timer1Timer 60 60 left = 180 -
trunk/Forms/UFormMain.pas
r10 r11 178 178 var 179 179 X, Y: Integer; 180 DX, DY: Integer; 180 181 Bitmap: TBitmap; 182 P, PR: PByte; 181 183 begin 182 184 try … … 186 188 187 189 if Assigned(VideoDevice.VideoMemory) then begin 188 for Y := 0 to VideoDevice.VideoMode.Size.Y - 1 do 189 for X := 0 to VideoDevice.VideoMode.Size.X - 1 do begin 190 Bitmap.Canvas.Pixels[X, Y] := PInteger(VideoDevice.VideoMemory + X * VideoDevice.VideoMode.GetBytesPerPixel + 191 Y * VideoDevice.VideoMode.GetBytesPerLine)^ and $ffffff; 190 DX := VideoDevice.VideoMode.GetBytesPerPixel; 191 DY := VideoDevice.VideoMode.GetBytesPerLine; 192 P := VideoDevice.VideoMemory; 193 for Y := 0 to VideoDevice.VideoMode.Size.Y - 1 do begin 194 PR := P; 195 for X := 0 to VideoDevice.VideoMode.Size.X - 1 do begin 196 Bitmap.Canvas.Pixels[X, Y] := PInteger(PR)^ and $ffffff; 197 Inc(PR, DX); 198 end; 199 Inc(P, DY); 192 200 end; 193 201 end;
Note:
See TracChangeset
for help on using the changeset viewer.