Changeset 15 for trunk/Packages/Kernel
- Timestamp:
- Dec 27, 2017, 8:28:45 PM (7 years ago)
- Location:
- trunk/Packages/Kernel
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Kernel/UAPI.pas
r13 r15 252 252 if Assigned(Window) then begin 253 253 Canvas := Window.Canvas; 254 Canvas.Parent := TKernel(Kernel).Screens.First.Canvas;255 254 Result := Canvas.Id; 256 255 end else Result := -1; -
trunk/Packages/Kernel/UGraphics.pas
r13 r15 70 70 Id: Integer; 71 71 Visible: Boolean; 72 constructor Create; 72 73 procedure Paint; virtual; 73 74 property Canvas: TCanvas read GetCanvas; … … 102 103 Objects: TFPGObjectList<TGraphicObject>; 103 104 Canvases: TFPGObjectList<TCanvas>; 105 ParentCanvas: TCanvas; 104 106 function CreateWindow: TWindow; 105 107 function CreateCanvas: TCanvas; … … 225 227 function TGraphicObject.GetCanvas: TCanvas; 226 228 begin 227 FCanvas := Desktop.CreateCanvas; 229 if not Assigned(FCanvas) then 230 FCanvas := Desktop.CreateCanvas; 228 231 Result := FCanvas; 232 end; 233 234 constructor TGraphicObject.Create; 235 begin 236 FCanvas := nil; 229 237 end; 230 238 … … 257 265 Result := TWindow.Create; 258 266 Result.Id := ObjectLastId; 267 Result.Desktop := Self; 268 Result.Canvas.Parent := ParentCanvas; 259 269 Objects.Add(Result); 270 Paint; 260 271 end; 261 272 -
trunk/Packages/Kernel/UKernel.pas
r13 r15 89 89 TScreenCanvas(NewScreen.Canvas).Screen := NewScreen; 90 90 Screens.Add(NewScreen); 91 Desktop.ParentCanvas := Screens.First.Canvas; 91 92 end; 92 93 Modes.Free; -
trunk/Packages/Kernel/UScreen.pas
r13 r15 68 68 for X := Rect.Left to Rect.Right do 69 69 SetPixel(TPoint.Create(X, Y), Color); 70 Screen.VideoMemoryUpdated; 70 71 end; 71 72
Note:
See TracChangeset
for help on using the changeset viewer.