Image properties ?
Moderators: SDS, support, admin
Image properties ?
Is it possible to have the image properties ?
For exemple, get paper size (A0..A4 ? )
Thx
ps: under Delphi 7
For exemple, get paper size (A0..A4 ? )
Thx
ps: under Delphi 7
Hello,
This is impossible to implement directly. But you can get the sizes of CAD images. For TsgDXFImage, TsgDWGImage, TsgSVGImage and TsgCGMImage:
<b>Note</b>:
the returned values are in inches if:
else in millimetres.
For TsgHPGLImage:
<b>Note</b>:
the returned values are the 100-th shares of millimeter
Sergey.
please post questions to the forum or write to support@cadsofttools.com
This is impossible to implement directly. But you can get the sizes of CAD images. For TsgDXFImage, TsgDWGImage, TsgSVGImage and TsgCGMImage:
Code: Select all
var
vRect: TFRect;
...
begin
...
vRect := TsgDXFImage(sgPaintBox.Picture.Graphic).Extents;
ImageWidth := vRect.Right - vRect.Left;
ImageHeight := vRect.Top - vRect.Bottom;
...
end;
the returned values are in inches if:
Code: Select all
TsgDXFImage(sgPaintBox.Picture.Graphic).CurrentLayout.PlotSettings.PlotPaperUnits = 0
For TsgHPGLImage:
Code: Select all
ImageWidth := TsgHPGLImage(sgPaintBox.Picture.Graphic).MMWidth / 100;
ImageHeight := TsgHPGLImage(sgPaintBox.Picture.Graphic).MMHeight / 100;
the returned values are the 100-th shares of millimeter
Sergey.
please post questions to the forum or write to support@cadsofttools.com
Hello,
They can get sizes of the drawing only when it has been loaded. Knowing sizes of the drawing and sizes of sheets they can select acceptable format of the sheet for printing.
Could you please explain in detail what tasks are standing before you for we'd find the easiest way to solve them.
Sergey.
please post questions to the forum or write to support@cadsofttools.com
They can get sizes of the drawing only when it has been loaded. Knowing sizes of the drawing and sizes of sheets they can select acceptable format of the sheet for printing.
Could you please explain in detail what tasks are standing before you for we'd find the easiest way to solve them.
Sergey.
please post questions to the forum or write to support@cadsofttools.com