- Timestamp:
- Aug 29, 2016, 6:09:30 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Apps/UClock.pas
r10 r11 43 43 Angle := Frac(Now / (10 * OneSecond)) * 2 * Pi; 44 44 API.DrawLine(Point(120, 120), Point(Trunc(120 + Cos(Angle) * 60), Trunc(120 + Sin(Angle) * 60)), 0); 45 API.Sleep(OneMillisecond * 50);45 API.Sleep(OneMillisecond * 10); 46 46 //API.ReadMessage(Message); 47 47 end; -
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; -
trunk/Packages/Kernel/UGraphics.pas
r8 r11 6 6 7 7 uses 8 Classes, SysUtils, Contnrs;8 Classes, SysUtils, fgl; 9 9 10 10 type … … 43 43 44 44 TDesktop = class 45 Objects: T ObjectList; // TList<TGraphicObject>45 Objects: TFPGObjectList<TGraphicObject>; 46 46 procedure Paint; 47 47 constructor Create; … … 88 88 constructor TDesktop.Create; 89 89 begin 90 Objects := T ObjectList.Create;90 Objects := TFPGObjectList<TGraphicObject>.Create; 91 91 end; 92 92
Note:
See TracChangeset
for help on using the changeset viewer.