Changeset 235 for trunk/Forms
- Timestamp:
- Sep 20, 2018, 11:44:42 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormClient.pas
r234 r235 192 192 {$endif} 193 193 194 {if Game.CyclicMap then begin194 if Game.CyclicMap then begin 195 195 VS := View.CellToCanvasPos(Game.Map.Size); 196 196 TempView := TView.Create; 197 197 TempView.Game := Game; 198 R := TRect.Create(View.CellToCanvasPos(Game.Map.Cells.First.PosPx), 199 View.CellToCanvasPos(Game.Map.Cells.Last.PosPx)); 198 //R := View.CellToCanvasRect(TRect.Create(Game.Map.Cells.First.PosPx, 199 // Game.Map.Cells.Last.PosPx)); 200 R := View.CellToCanvasRect(Game.Map.PixelRect); 200 201 StartP := TPoint.Create(Ceil(R.P1.X / R.Size.X) * R.Size.X, 201 202 Ceil(R.P1.Y / R.Size.Y) * R.Size.Y); … … 204 205 for Y := 0 to CountP.Y do begin 205 206 for X := 0 to CountP.X do begin 206 TempView.Zoom := View.Zoom; 207 TempView.SourceRect := View.SourceRect; 207 TempView.Assign(View); 208 208 TempView.DestRect := TRect.Create( 209 TPoint.Create( 210 -StartP.X + R.Size.X * X, 211 -StartP.Y + R.Size.Y * Y), 212 TPoint.Create( 213 -StartP.X + R.Size.X * X + View.DestRect.Size.X, 214 -StartP.Y + R.Size.Y * Y + View.DestRect.Size.Y) 209 TPoint.Create( 210 -StartP.X + R.Size.X * X, 211 -StartP.Y + R.Size.Y * Y 212 ), 213 TPoint.Create( 214 -StartP.X + R.Size.X * X + View.DestRect.Size.X, 215 -StartP.Y + R.Size.Y * Y + View.DestRect.Size.Y 216 ) 215 217 ); 216 218 Client.Paint(PaintBox1.Canvas, TempView); … … 219 221 TempView.Free; 220 222 end else 221 }Client.Paint(PaintBox1.Canvas, View);223 Client.Paint(PaintBox1.Canvas, View); 222 224 end; 223 225 end;
Note:
See TracChangeset
for help on using the changeset viewer.