Panning a view
Moderators: SDS, support, admin
Panning a view
Hi,
There is a Scale command which is scaling the drawing but not a Pan command( I couldn't find it in the help). How can I pan the zoomed drawing from one point to another.
Thanks
Aby
There is a Scale command which is scaling the drawing but not a Pan command( I couldn't find it in the help). How can I pan the zoomed drawing from one point to another.
Thanks
Aby
Hello!
The following code is based on <b>Template</b> demo. It is available at: http://www.cadsofttools.com/download/Template.zip
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
The following code is based on <b>Template</b> demo. It is available at: http://www.cadsofttools.com/download/Template.zip
Code: Select all
<b>procedure</b> TForm1.btnMoveClick(Sender: TObject);
<b>var</b>
vPoint: TPoint;
vFPoint: TFPoint;
vScale: double;
<b>begin</b>
vPoint := sgPaintBox.Center;
vFPoint := sgPaintBox.GetDrawingInternalCoordsWithoutSnap(vPoint.X + <font color="blue">10</font id="blue">, vPoint.Y + <font color="blue">10</font id="blue">);
vScale := sgPaintBox.Scale;
sgPaintBox.ShowPoint(vFPoint, vScale);
sgPaintBox.Invalidate;
<b>end</b>;
Please post questions to the forum or write to support@cadsofttools.com
BTW: <b>CAD Import VCL</b> v.6.2 will include new procedure:
This procedure will let to manage without previous code.
<br />
We will inform you when new version of the library will be released.
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
Code: Select all
<b>unit</b> SGDrawingNavigator;
TSGDrawingNavigator = <b>class</b> (...)
...
<b>procedure</b> MovePictureRect(Dx, Dy: Integer);
...
<br />
We will inform you when new version of the library will be released.
Sergey.
Please post questions to the forum or write to support@cadsofttools.com