Changeset 245 for trunk/Forms/UFormClient.pas
- Timestamp:
- Sep 22, 2018, 1:07:53 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormClient.pas
r243 r245 12 12 const 13 13 ZoomFactor = 1.5; 14 MinZoom = 0.05; 15 MaxZoom = 10; 14 16 MouseMinDiff = 0.1; 15 17 … … 447 449 begin 448 450 with Client do begin 449 View.Zoom := View.Zoom * ZoomFactor; 451 if View.Zoom * ZoomFactor < MaxZoom then 452 View.Zoom := View.Zoom * ZoomFactor; 450 453 end; 451 454 Redraw; … … 453 456 454 457 procedure TFormClient.AZoomOutExecute(Sender: TObject); 455 //var456 // D: TPoint;457 458 begin 458 459 with Client do begin 459 //D := Point(Trunc(MousePos.X - View.Left / ViewZoom), 460 // Trunc(MousePos.Y - View.Top / ViewZoom)); 461 View.Zoom := View.Zoom / ZoomFactor; 462 //View := Bounds(Trunc((D.X - MousePos.X) * ViewZoom), 463 // Trunc((D.Y - MousePos.Y) * ViewZoom), 464 // View.Right - View.Left, 465 // View.Bottom - View.Top); 460 if View.Zoom / ZoomFactor > MinZoom then 461 View.Zoom := View.Zoom / ZoomFactor; 466 462 end; 467 463 Redraw;
Note:
See TracChangeset
for help on using the changeset viewer.