Hi all.
I download a package of a new version of a Cadimage.dll with demo in the package. But in this demo Show Point from menu don't work.
The code from demo to locate a point is:
procedure TfmMain.mmiShowPointClick(Sender: TObject);
var
vScale: Double;
vRect: TRect;
vCADRect: TFRect;
vRes: Integer;
vCenter: TPoint;
ShowMarker: Boolean;
vFRect, vDefRect: TFRect;
vFPoint: TFPoint;
begin
GetExtentsCAD(FCADFile, vCADRect);
ShowMarker := FShowFndPntMarker;
vDefRect := GetDefDrawRect;
vScale := (vDefRect.Right - vDefRect.Left) / (vCADRect.Right - vCADRect.Left);
vRes := GetPointParams(vCADRect, vScale, FCADPoint, ShowMarker);
if vRes = 0 then Exit;
if (vCADRect.Left < FCADPoint.X) and (FCADPoint.X < vCADRect.Right) and
(vCADRect.Bottom < FCADPoint.Y) and (FCADPoint.Y < vCADRect.Top) then
begin
FShowFndPntMarker := ShowMarker;
vFRect := GetDefDrawRect;
vRect := RoundRect(vFRect);
vCenter.X := pbImage.ClientWidth div 2;
vCenter.Y := pbImage.ClientHeight div 2;
FDrawRect := vCADRect;
OffsetFRect(FDrawRect, -FDrawRect.Left, -FDrawRect.Top, -FDrawRect.Z1); // 100%
FDrawRect.Bottom := -FDrawRect.Bottom;
ScaleRectangleF(vScale, MakeFPoint(0, 0), FDrawRect);
vFPoint.X := FDrawRect.Right * FCADPoint.X / (vCADRect.Right - vCADRect.Left);
vFPoint.Y := FDrawRect.Bottom * (1 - FCADPoint.Y / (vCADRect.Top - vCADRect.Bottom));
vFPoint.Z := 0;
OffsetFRect(FDrawRect, -(vFPoint.X - vCenter.X),
-(vFPoint.Y - vCenter.Y), 0);
Invalidate;
end
else
ShowMessage('Seleted point does not belong to the drawing');
end;
On old version this function is work perfectly but in new the source is changed and this didn't work.
Can somebody help me.
Thanks.
CADImage show point problem
Moderators: SDS, support, admin
Re: CADImage show point problem
Hello.
The incorrect results of ShowPoint function caused by changes in library kernel. We will consider this problem.
Alexander.
The incorrect results of ShowPoint function caused by changes in library kernel. We will consider this problem.
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support