unit FNavForm; interface uses System.SysUtils, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, //GR32 GR32_Image, GR32, GR32_Layers, GLS.HeightTileFileHDS; type TNavForm = class(TForm) Image: TImage32; procedure ImageMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer; Layer: TCustomLayer); private FPickX, FPickY : Integer; public function Execute(htf : TGLHeightTileFile) : Boolean; property PickX : Integer read FPickX; property PickY : Integer read FPickY; end; var NavForm: TNavForm; implementation {$R *.dfm} uses FViewerForm; function TNavForm.Execute(htf : TGLHeightTileFile) : Boolean; var i, x, y, w, s, wx, wy : Integer; begin // Computes scaling so that preview window isn't too small with htf do begin wx:=(SizeX+TileSize div 2) div TileSize; wy:=(SizeY+TileSize div 2) div TileSize; end; if wx