Constructor DxfRasterImageDef
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
DxfRasterImageDef(string, GeoVector2)
Initializes a definition made in code of a picture file, as AutoCAD's new RasterImageDef() given its
SourceFileName and loaded: the path as it is to be written, and the size in pixels the caller gives, which
AutoCAD reads from the file when it loads it and the library does not; a pixel (1, 1) in no unit, and loaded (280 of
1), as ezdxf writes a new one, so that AutoCAD loads the picture when it opens the drawing. Added to a drawing by
SetAt(string, DxfDBObject) of its dictionary of images (CreateImageDictionary(DxfDatabase)).
public DxfRasterImageDef(string sourceFileName, GeoVector2 size)
Parameters
sourceFileNamestringThe path of the picture, as it is to be written:
C:\pictures\px43.png. AutoCAD 2021 refuses a path it does not find (eFileAccessErr); the library writes it as given.sizeGeoVector2The size of the picture in pixels across and up, each above nought.
Exceptions
- ArgumentNullException
Thrown when the path is null.
- ArgumentOutOfRangeException
Thrown when a part of the size is not a finite number above nought.