Changeset 204
- Timestamp:
- May 20, 2018, 10:23:13 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UGame.pas
r203 r204 184 184 private 185 185 FSize: TPoint; 186 function GetPixelRect: TRect; 186 187 function GetSize: TPoint; virtual; 187 188 procedure PaintCell(Canvas: TCanvas; Pos: TPoint; Text: string; View: TView; … … 230 231 procedure ForEachCells(Method: TMethod); virtual; 231 232 property Size: TPoint read GetSize write SetSize; 232 property PixelRect: TRect read FPixelRect;233 property PixelRect: TRect read GetPixelRect; 233 234 end; 234 235 … … 1255 1256 end; 1256 1257 1258 function TMap.GetPixelRect: TRect; 1259 begin 1260 if FPixelRect.Empty then FPixelRect := CalculatePixelRect; 1261 Result := FPixelRect; 1262 end; 1263 1257 1264 procedure TMap.SetSize(AValue: TPoint); 1258 1265 begin … … 1415 1422 if Assigned(Node2) then 1416 1423 CellLinks.LoadFromNode(Node2); 1424 FPixelRect := CalculatePixelRect; 1417 1425 end; 1418 1426 … … 1576 1584 Cells[Y * FSize.X + X] := NewCell; 1577 1585 end; 1578 FPixelRect := CalculatePixelRect;1586 FPixelRect := FPixelRect; 1579 1587 end; 1580 1588 … … 1656 1664 Cells.Clear; 1657 1665 FNewCellId := 1; 1666 FPixelRect.SetEmpty; 1658 1667 end; 1659 1668
Note:
See TracChangeset
for help on using the changeset viewer.