Etc. I need view map in scale 1:58000 (in JTSK coords system , units are meters). I know that DXF file is in same coords system (JTSK). But i dont know how works scaling. In manual this information missing

Peter
Please so sorry for my english.
Moderators: SDS, support, admin
Code: Select all
// CADImage.IsWithoutBorder = true,
// DrawingExtents = CADImage.GetDrawingExtents,
// P from CADIterate (ImportLine, ImportPolyLine ect..),
// Factor = ScaleFactor * UnitFactor,
// ScaleFactor = 1 / 58000,
// UnitFactor = 1? (dxfUnitToMM),
P.X := (P.X + ViewPort.X - DrawingExtents.Left) * Factor;
P.Y := (DrawingExtents.Top - P.Y - ViewPort.Y) * Factor;
Code: Select all
// CADImage.IsWithoutBorder = true
// Factor = ScaleFactor * UnitFactor,
// ScaleFactor = 1 / 58000,
// UnitFactor = 1? (dxfUnitToMM)
FRect.Left := 0;
FRect.Top := 0;
FRect.Right := Round(FFactor * PixelsPerInch / 25.4 * FsgCADImage.AbsWidth);
FRect.Bottom := Round(FFactor * PixelsPerInch / 25.4 * FsgCADImage.AbsHeight);
FMetafile.Width := FRect.Right;
FMetafile.Height := FRect.Bottom;
MC := TMetafileCanvas.Create(FMetafile, 0);
try
MC.StretchDraw(FRect, FsgCADImage);
finally
MC.Free;
end;