thank you, but I ask some question.
I devlope using C++ Builder.
The first, oping a dxf file, I want to get a dxfimage of the over 200 zoomin centering a point.
TPoint tp = MakePoint(200, 100);
ChangeScale(true, 200, tp);
but not display any image.
so, slow zoomin... show image of the exact point..
What to do?
Please help...
and I conversion from delphi code to builder..
but I cannot get the mouse coords of the dxfimage.
//-------------------------------------------------------------------
Code: Select all
TFPoint <b>__fastcall</b> TForm1::GetRealPointUsingsgImagePoint(TsgImage *AsgImage, int X, int Y)
{
TRect vRect;
TFPoint Result;
<b>if</b>(!AsgImage->Picture->Graphic)
{
Result = MakeFPoint(0, 0, 0);
exit;
}
vRect = AsgImage->PictureRect();
<b>if</b>(((TsgDXFImage *)AsgImage->Picture->Graphic)->Converter->IsCrossoverMatrix)
{
<b>if</b> (((vRect.Right - vRect.Left) <= AsgImage->Width) || ((vRect.Bottom - vRect.Top) <= AsgImage->Height))
Result = ((TsgDXFImage *)AsgImage->Picture->Graphic)->GetCADCoords(X / (vRect.Right - vRect.Left),
(AsgImage->Height - Y) / (vRect.Bottom - vRect.Top));
<b>else</b>
Result = ((TsgDXFImage *)AsgImage->Picture->Graphic)->GetCADCoords((-(vRect.Left - AsgImage->Left) + X) / (vRect.Right - vRect.Left),
1 - (Y - (vRect.Top - AsgImage->Top)) / (vRect.Bottom - vRect.Top));
}
<b>else</b>
{
<b>if</b> (((vRect.Right - vRect.Left) <= AsgImage->Width) || ((vRect.Bottom - vRect.Top) <= AsgImage->Height))
Result = ((TsgDXFImage*)AsgImage->Picture->Graphic)->GetCADCoords(X / (vRect.Right - vRect.Left),
Y / (vRect.Bottom - vRect.Top));
<b>else</b>
Result = ((TsgDXFImage*)AsgImage->Picture->Graphic)->GetCADCoords((-(vRect.Left - AsgImage->Left) + X) / (vRect.Right - vRect.Left),
(Y - (vRect.Top - AsgImage->Top)) / (vRect.Bottom - vRect.Top));
}
<b>return</b> Result;
}
<blockquote id="quote"><font size="2" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by support</i>
<br />Hello!
There are some peculiarities for 3D rounded drawings. For example it can be seem that it is not rounded but actually axis OY is directed to you instead of axis OZ.
Could you please send to us CAD file with which problems occur.
CADImportVCL (available on:
http://www.cadsofttools.com/download/CADImportVCL.zip) includes in CADImportVCL\Delphi\Demos\Viewer Viewer demo with example of clipping of the rectangle in global drawing coordinates. It starts from the following string in Unit1.pas:
Code: Select all
procedure TForm1.sbDrawingBoxClick(Sender: TObject);-)
Sergey.
please post questions to the forum or write to
support@cadsofttools.com
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">