Changeset 78 for trunk/UGame.pas
- Timestamp:
- Nov 3, 2014, 8:04:02 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UGame.pas
r77 r78 7 7 uses 8 8 Classes, SysUtils, ExtCtrls, Graphics, Contnrs, XMLConf, XMLRead, XMLWrite, 9 DOM, Math, FileUtil, UXMLUtils, Dialogs ;9 DOM, Math, FileUtil, UXMLUtils, Dialogs, Types; 10 10 11 11 const … … 929 929 TextPos: TPoint; 930 930 Points: array of TPoint; 931 TextSize: TSize; 931 932 begin 932 933 with Canvas do begin … … 957 958 Pen.Style := psSolid; 958 959 Font.Color := clWhite; 960 Brush.Style := bsClear; 959 961 Font.Size := Trunc(42 * View.Zoom); 960 962 TextPos := View.CellToCanvasPos(Pos); 961 TextOut(Round(TextPos.X) - TextWidth(Text) div 2, Round(TextPos.Y) - TextHeight(Text) div 2, Text); 963 TextSize := TextExtent(Text); 964 TextOut(Round(TextPos.X) - TextSize.cx div 2, Round(TextPos.Y) - TextSize.cy div 2, Text); 962 965 end; 963 966 end;
Note:
See TracChangeset
for help on using the changeset viewer.