Changeset 79 for trunk/Packages/Common/UMetaCanvas.pas
- Timestamp:
- Feb 11, 2021, 11:20:18 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/UMetaCanvas.pas
r69 r79 6 6 7 7 uses 8 Classes, SysUtils, Graphics, Contnrs, Types ;8 Classes, SysUtils, Graphics, Contnrs, Types, fgl; 9 9 10 10 type … … 17 17 procedure Zoom(Factor: Double); virtual; 18 18 procedure Move(Delta: TPoint); virtual; 19 end; 20 21 TCanvasObjects = class(TFPGObjectList<TCanvasObject>) 19 22 end; 20 23 … … 133 136 procedure DoLineTo(X, Y: Integer); override; 134 137 public 135 Objects: T ObjectList;138 Objects: TCanvasObjects; 136 139 procedure FillRect(const ARect: TRect); overload; override; 137 140 procedure FillRect(X1,Y1,X2,Y2: Integer); overload; … … 145 148 procedure Pie(EllipseX1, EllipseY1, EllipseX2, EllipseY2, 146 149 StartX, StartY, EndX, EndY: Integer); override; 147 procedure SetSize(Size: TPoint);148 150 procedure Reset; 149 151 procedure DrawTo(Canvas: TCanvas); … … 152 154 constructor Create; 153 155 destructor Destroy; override; 154 end; 156 property Size: TPoint read FSize write FSize; 157 end; 158 155 159 156 160 implementation … … 198 202 Pen.Free; 199 203 Brush.Free; 200 inherited Destroy;204 inherited; 201 205 end; 202 206 … … 228 232 destructor TCanvasStretchDraw.Destroy; 229 233 begin 230 inherited Destroy;234 inherited; 231 235 end; 232 236 … … 264 268 Pen.Free; 265 269 Brush.Free; 266 inherited Destroy;270 inherited; 267 271 end; 268 272 … … 304 308 Brush.Free; 305 309 Pen.Free; 306 inherited Destroy;310 inherited; 307 311 end; 308 312 … … 336 340 begin 337 341 Pen.Free; 338 inherited Destroy;342 inherited; 339 343 end; 340 344 … … 375 379 Pen.Free; 376 380 Brush.Free; 377 inherited Destroy;381 inherited; 378 382 end; 379 383 … … 408 412 Brush.Free; 409 413 Font.Free; 410 inherited Destroy;414 inherited; 411 415 end; 412 416 … … 618 622 end; 619 623 620 procedure TMetaCanvas.SetSize(Size: TPoint);621 begin622 FSize := Size;623 end;624 625 624 procedure TMetaCanvas.Reset; 626 625 begin … … 633 632 begin 634 633 for I := 0 to Objects.Count - 1 do 635 TCanvasObject(Objects[I]).Paint(Canvas);634 Objects[I].Paint(Canvas); 636 635 end; 637 636 … … 641 640 begin 642 641 for I := 0 to Objects.Count - 1 do 643 TCanvasObject(Objects[I]).Zoom(Factor);642 Objects[I].Zoom(Factor); 644 643 end; 645 644 … … 649 648 begin 650 649 for I := 0 to Objects.Count - 1 do 651 TCanvasObject(Objects[I]).Move(Delta);650 Objects[I].Move(Delta); 652 651 end; 653 652 … … 656 655 inherited; 657 656 FPenPos := Point(0, 0); 658 Objects := T ObjectList.Create;657 Objects := TCanvasObjects.Create; 659 658 end; 660 659 … … 662 661 begin 663 662 Objects.Free; 664 inherited Destroy;663 inherited; 665 664 end; 666 665
Note:
See TracChangeset
for help on using the changeset viewer.