Changeset 100 for trunk/Game.pas
- Timestamp:
- Dec 9, 2024, 9:41:19 AM (13 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Game.pas
r90 r100 651 651 S: TPoint; 652 652 MetaCanvas: TMetaCanvas; 653 BorderSize: Integer; 653 654 begin 654 655 MetaCanvas := TMetaCanvas.Create; … … 673 674 // Form.Canvas.Width and Form.Canvas.Height is not working correctly under Windows. 674 675 // So dimensions are provided by CanvasSize parameter. 675 Frame := Rect(2, TopBarHeight, CanvasSize.X - 2, CanvasSize.Y - 2); 676 BorderSize := ScaleY(2, 96); 677 Frame := Rect(BorderSize, BorderSize + TopBarHeight, CanvasSize.X - BorderSize, CanvasSize.Y - BorderSize); 676 678 TileSize := Point(Frame.Width div Board.Size.X, Frame.Height div Board.Size.Y); 677 679 if TileSize.X < TileSize.Y then TileSize.Y := TileSize.X; 678 680 if TileSize.Y < TileSize.X then TileSize.X := TileSize.Y; 679 Frame := Rect(Frame. Width div 2 - (Board.Size.X * TileSize.X) div 2,681 Frame := Rect(Frame.Left + Frame.Width div 2 - (Board.Size.X * TileSize.X) div 2, 680 682 Frame.Top + Frame.Height div 2 - (Board.Size.Y * TileSize.Y) div 2, 681 Frame. Width div 2 + (Board.Size.X * TileSize.X) div 2,683 Frame.Left + Frame.Width div 2 + (Board.Size.X * TileSize.X) div 2, 682 684 Frame.Top + Frame.Height div 2 + (Board.Size.Y * TileSize.Y) div 2); 683 685
Note:
See TracChangeset
for help on using the changeset viewer.