@mlightcad/data-model
Version:
The data-model package provides the core classes for interacting with AutoCAD's database and entities. This package mimics AutoCAD ObjectARX's AcDb (Database) classes and implements the drawing database structure that AutoCAD developers are familiar with.
82 lines • 3.05 kB
JavaScript
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { AcDbObject } from '../base';
/**
* The AcDbRasterImageDef object (or "image definition object") works with the AcDbRasterImage entity
* (or "image entity") to implement raster images inside AutoCAD.
*
* The relationship between these two classes is much like the relationship between an AutoCAD block
* definition object and a block insert entity. The image definition object plays a behind-the-scenes
* role like the block definition, maintaining links to the source image file and managing low-level
* image processing operations required to display and plot images. Image definition objects are stored
* in a special AcDbDictionary named ISM_RASTER_IMAGE_DICT.
*
* @example
* ```typescript
* const imageDef = new AcDbRasterImageDef();
* imageDef.sourceFileName = '/path/to/image.jpg';
* ```
*/
var AcDbRasterImageDef = /** @class */ (function (_super) {
__extends(AcDbRasterImageDef, _super);
/**
* Creates a new AcDbRasterImageDef instance.
*
* @example
* ```typescript
* const imageDef = new AcDbRasterImageDef();
* ```
*/
function AcDbRasterImageDef() {
var _this = _super.call(this) || this;
_this._sourceFileName = '';
return _this;
}
Object.defineProperty(AcDbRasterImageDef.prototype, "sourceFileName", {
/**
* Gets the path name of the externally referenced image file.
*
* @returns The source file name/path
*
* @example
* ```typescript
* const fileName = imageDef.sourceFileName;
* console.log('Image file:', fileName);
* ```
*/
get: function () {
return this._sourceFileName;
},
/**
* Sets the path name of the externally referenced image file.
*
* @param value - The new source file name/path
*
* @example
* ```typescript
* imageDef.sourceFileName = '/path/to/image.jpg';
* ```
*/
set: function (value) {
this._sourceFileName = value;
},
enumerable: false,
configurable: true
});
return AcDbRasterImageDef;
}(AcDbObject));
export { AcDbRasterImageDef };
//# sourceMappingURL=AcDbRasterImageDef.js.map