@mlightcad/data-model 1.3.0 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/dist/data-model.cjs +0 -5
- package/dist/data-model.js +0 -25305
- package/dist/dxf-parser-worker.js +0 -1669
- package/lib/base/AcDbHostApplicationServices.d.ts +0 -96
- package/lib/base/AcDbHostApplicationServices.d.ts.map +0 -1
- package/lib/base/AcDbHostApplicationServices.js +0 -118
- package/lib/base/AcDbHostApplicationServices.js.map +0 -1
- package/lib/base/AcDbObject.d.ts +0 -205
- package/lib/base/AcDbObject.d.ts.map +0 -1
- package/lib/base/AcDbObject.js +0 -236
- package/lib/base/AcDbObject.js.map +0 -1
- package/lib/base/index.d.ts +0 -3
- package/lib/base/index.d.ts.map +0 -1
- package/lib/base/index.js +0 -3
- package/lib/base/index.js.map +0 -1
- package/lib/converter/AcDbBatchProcessing.d.ts +0 -146
- package/lib/converter/AcDbBatchProcessing.d.ts.map +0 -1
- package/lib/converter/AcDbBatchProcessing.js +0 -272
- package/lib/converter/AcDbBatchProcessing.js.map +0 -1
- package/lib/converter/AcDbDxfConverter.d.ts +0 -272
- package/lib/converter/AcDbDxfConverter.d.ts.map +0 -1
- package/lib/converter/AcDbDxfConverter.js +0 -872
- package/lib/converter/AcDbDxfConverter.js.map +0 -1
- package/lib/converter/AcDbDxfParser.d.ts +0 -23
- package/lib/converter/AcDbDxfParser.d.ts.map +0 -1
- package/lib/converter/AcDbDxfParser.js +0 -83
- package/lib/converter/AcDbDxfParser.js.map +0 -1
- package/lib/converter/AcDbEntitiyConverter.d.ts +0 -159
- package/lib/converter/AcDbEntitiyConverter.d.ts.map +0 -1
- package/lib/converter/AcDbEntitiyConverter.js +0 -659
- package/lib/converter/AcDbEntitiyConverter.js.map +0 -1
- package/lib/converter/AcDbObjectConverter.d.ts +0 -61
- package/lib/converter/AcDbObjectConverter.d.ts.map +0 -1
- package/lib/converter/AcDbObjectConverter.js +0 -91
- package/lib/converter/AcDbObjectConverter.js.map +0 -1
- package/lib/converter/index.d.ts +0 -4
- package/lib/converter/index.d.ts.map +0 -1
- package/lib/converter/index.js +0 -4
- package/lib/converter/index.js.map +0 -1
- package/lib/converter/worker/AcDbBaseWorker.d.ts +0 -36
- package/lib/converter/worker/AcDbBaseWorker.d.ts.map +0 -1
- package/lib/converter/worker/AcDbBaseWorker.js +0 -93
- package/lib/converter/worker/AcDbBaseWorker.js.map +0 -1
- package/lib/converter/worker/AcDbDxfParserWorker.d.ts +0 -11
- package/lib/converter/worker/AcDbDxfParserWorker.d.ts.map +0 -1
- package/lib/converter/worker/AcDbDxfParserWorker.js +0 -75
- package/lib/converter/worker/AcDbDxfParserWorker.js.map +0 -1
- package/lib/converter/worker/AcDbWorkerManager.d.ts +0 -107
- package/lib/converter/worker/AcDbWorkerManager.d.ts.map +0 -1
- package/lib/converter/worker/AcDbWorkerManager.js +0 -360
- package/lib/converter/worker/AcDbWorkerManager.js.map +0 -1
- package/lib/converter/worker/index.d.ts +0 -3
- package/lib/converter/worker/index.d.ts.map +0 -1
- package/lib/converter/worker/index.js +0 -3
- package/lib/converter/worker/index.js.map +0 -1
- package/lib/database/AcDbBlockTable.d.ts +0 -56
- package/lib/database/AcDbBlockTable.d.ts.map +0 -1
- package/lib/database/AcDbBlockTable.js +0 -98
- package/lib/database/AcDbBlockTable.js.map +0 -1
- package/lib/database/AcDbBlockTableRecord.d.ts +0 -185
- package/lib/database/AcDbBlockTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbBlockTableRecord.js +0 -261
- package/lib/database/AcDbBlockTableRecord.js.map +0 -1
- package/lib/database/AcDbDatabase.d.ts +0 -575
- package/lib/database/AcDbDatabase.d.ts.map +0 -1
- package/lib/database/AcDbDatabase.js +0 -833
- package/lib/database/AcDbDatabase.js.map +0 -1
- package/lib/database/AcDbDatabaseConverter.d.ts +0 -292
- package/lib/database/AcDbDatabaseConverter.d.ts.map +0 -1
- package/lib/database/AcDbDatabaseConverter.js +0 -447
- package/lib/database/AcDbDatabaseConverter.js.map +0 -1
- package/lib/database/AcDbDatabaseConverterManager.d.ts +0 -141
- package/lib/database/AcDbDatabaseConverterManager.d.ts.map +0 -1
- package/lib/database/AcDbDatabaseConverterManager.js +0 -173
- package/lib/database/AcDbDatabaseConverterManager.js.map +0 -1
- package/lib/database/AcDbDimStyleTable.d.ts +0 -31
- package/lib/database/AcDbDimStyleTable.d.ts.map +0 -1
- package/lib/database/AcDbDimStyleTable.js +0 -49
- package/lib/database/AcDbDimStyleTable.js.map +0 -1
- package/lib/database/AcDbDimStyleTableRecord.d.ts +0 -797
- package/lib/database/AcDbDimStyleTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbDimStyleTableRecord.js +0 -1294
- package/lib/database/AcDbDimStyleTableRecord.js.map +0 -1
- package/lib/database/AcDbDwgVersion.d.ts +0 -32
- package/lib/database/AcDbDwgVersion.d.ts.map +0 -1
- package/lib/database/AcDbDwgVersion.js +0 -76
- package/lib/database/AcDbDwgVersion.js.map +0 -1
- package/lib/database/AcDbLayerTable.d.ts +0 -51
- package/lib/database/AcDbLayerTable.d.ts.map +0 -1
- package/lib/database/AcDbLayerTable.js +0 -92
- package/lib/database/AcDbLayerTable.js.map +0 -1
- package/lib/database/AcDbLayerTableRecord.d.ts +0 -278
- package/lib/database/AcDbLayerTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbLayerTableRecord.js +0 -397
- package/lib/database/AcDbLayerTableRecord.js.map +0 -1
- package/lib/database/AcDbLinetypeTable.d.ts +0 -30
- package/lib/database/AcDbLinetypeTable.d.ts.map +0 -1
- package/lib/database/AcDbLinetypeTable.js +0 -48
- package/lib/database/AcDbLinetypeTable.js.map +0 -1
- package/lib/database/AcDbLinetypeTableRecord.d.ts +0 -79
- package/lib/database/AcDbLinetypeTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbLinetypeTableRecord.js +0 -129
- package/lib/database/AcDbLinetypeTableRecord.js.map +0 -1
- package/lib/database/AcDbSymbolTable.d.ts +0 -199
- package/lib/database/AcDbSymbolTable.d.ts.map +0 -1
- package/lib/database/AcDbSymbolTable.js +0 -264
- package/lib/database/AcDbSymbolTable.js.map +0 -1
- package/lib/database/AcDbSymbolTableRecord.d.ts +0 -61
- package/lib/database/AcDbSymbolTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbSymbolTableRecord.js +0 -82
- package/lib/database/AcDbSymbolTableRecord.js.map +0 -1
- package/lib/database/AcDbTextStyleTable.d.ts +0 -48
- package/lib/database/AcDbTextStyleTable.d.ts.map +0 -1
- package/lib/database/AcDbTextStyleTable.js +0 -112
- package/lib/database/AcDbTextStyleTable.js.map +0 -1
- package/lib/database/AcDbTextStyleTableRecord.d.ts +0 -179
- package/lib/database/AcDbTextStyleTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbTextStyleTableRecord.js +0 -276
- package/lib/database/AcDbTextStyleTableRecord.js.map +0 -1
- package/lib/database/AcDbViewportTable.d.ts +0 -31
- package/lib/database/AcDbViewportTable.d.ts.map +0 -1
- package/lib/database/AcDbViewportTable.js +0 -49
- package/lib/database/AcDbViewportTable.js.map +0 -1
- package/lib/database/AcDbViewportTableRecord.d.ts +0 -154
- package/lib/database/AcDbViewportTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbViewportTableRecord.js +0 -318
- package/lib/database/AcDbViewportTableRecord.js.map +0 -1
- package/lib/database/index.d.ts +0 -19
- package/lib/database/index.d.ts.map +0 -1
- package/lib/database/index.js +0 -19
- package/lib/database/index.js.map +0 -1
- package/lib/entity/AcDbArc.d.ts +0 -254
- package/lib/entity/AcDbArc.d.ts.map +0 -1
- package/lib/entity/AcDbArc.js +0 -340
- package/lib/entity/AcDbArc.js.map +0 -1
- package/lib/entity/AcDbBlockReference.d.ts +0 -190
- package/lib/entity/AcDbBlockReference.d.ts.map +0 -1
- package/lib/entity/AcDbBlockReference.js +0 -302
- package/lib/entity/AcDbBlockReference.js.map +0 -1
- package/lib/entity/AcDbCircle.d.ts +0 -186
- package/lib/entity/AcDbCircle.d.ts.map +0 -1
- package/lib/entity/AcDbCircle.js +0 -249
- package/lib/entity/AcDbCircle.js.map +0 -1
- package/lib/entity/AcDbCurve.d.ts +0 -42
- package/lib/entity/AcDbCurve.d.ts.map +0 -1
- package/lib/entity/AcDbCurve.js +0 -44
- package/lib/entity/AcDbCurve.js.map +0 -1
- package/lib/entity/AcDbEllipse.d.ts +0 -207
- package/lib/entity/AcDbEllipse.d.ts.map +0 -1
- package/lib/entity/AcDbEllipse.js +0 -272
- package/lib/entity/AcDbEllipse.js.map +0 -1
- package/lib/entity/AcDbEntity.d.ts +0 -385
- package/lib/entity/AcDbEntity.d.ts.map +0 -1
- package/lib/entity/AcDbEntity.js +0 -561
- package/lib/entity/AcDbEntity.js.map +0 -1
- package/lib/entity/AcDbFace.d.ts +0 -151
- package/lib/entity/AcDbFace.d.ts.map +0 -1
- package/lib/entity/AcDbFace.js +0 -224
- package/lib/entity/AcDbFace.js.map +0 -1
- package/lib/entity/AcDbHatch.d.ts +0 -174
- package/lib/entity/AcDbHatch.d.ts.map +0 -1
- package/lib/entity/AcDbHatch.js +0 -250
- package/lib/entity/AcDbHatch.js.map +0 -1
- package/lib/entity/AcDbLeader.d.ts +0 -243
- package/lib/entity/AcDbLeader.d.ts.map +0 -1
- package/lib/entity/AcDbLeader.js +0 -358
- package/lib/entity/AcDbLeader.js.map +0 -1
- package/lib/entity/AcDbLine.d.ts +0 -198
- package/lib/entity/AcDbLine.d.ts.map +0 -1
- package/lib/entity/AcDbLine.js +0 -300
- package/lib/entity/AcDbLine.js.map +0 -1
- package/lib/entity/AcDbMText.d.ts +0 -248
- package/lib/entity/AcDbMText.d.ts.map +0 -1
- package/lib/entity/AcDbMText.js +0 -414
- package/lib/entity/AcDbMText.js.map +0 -1
- package/lib/entity/AcDbPoint.d.ts +0 -113
- package/lib/entity/AcDbPoint.d.ts.map +0 -1
- package/lib/entity/AcDbPoint.js +0 -155
- package/lib/entity/AcDbPoint.js.map +0 -1
- package/lib/entity/AcDbPolyline.d.ts +0 -221
- package/lib/entity/AcDbPolyline.d.ts.map +0 -1
- package/lib/entity/AcDbPolyline.js +0 -301
- package/lib/entity/AcDbPolyline.js.map +0 -1
- package/lib/entity/AcDbRasterImage.d.ts +0 -216
- package/lib/entity/AcDbRasterImage.d.ts.map +0 -1
- package/lib/entity/AcDbRasterImage.js +0 -451
- package/lib/entity/AcDbRasterImage.js.map +0 -1
- package/lib/entity/AcDbRay.d.ts +0 -150
- package/lib/entity/AcDbRay.d.ts.map +0 -1
- package/lib/entity/AcDbRay.js +0 -208
- package/lib/entity/AcDbRay.js.map +0 -1
- package/lib/entity/AcDbSpline.d.ts +0 -135
- package/lib/entity/AcDbSpline.d.ts.map +0 -1
- package/lib/entity/AcDbSpline.js +0 -142
- package/lib/entity/AcDbSpline.js.map +0 -1
- package/lib/entity/AcDbTable.d.ts +0 -260
- package/lib/entity/AcDbTable.d.ts.map +0 -1
- package/lib/entity/AcDbTable.js +0 -452
- package/lib/entity/AcDbTable.js.map +0 -1
- package/lib/entity/AcDbText.d.ts +0 -388
- package/lib/entity/AcDbText.d.ts.map +0 -1
- package/lib/entity/AcDbText.js +0 -523
- package/lib/entity/AcDbText.js.map +0 -1
- package/lib/entity/AcDbTrace.d.ts +0 -193
- package/lib/entity/AcDbTrace.d.ts.map +0 -1
- package/lib/entity/AcDbTrace.js +0 -271
- package/lib/entity/AcDbTrace.js.map +0 -1
- package/lib/entity/AcDbViewport.d.ts +0 -173
- package/lib/entity/AcDbViewport.d.ts.map +0 -1
- package/lib/entity/AcDbViewport.js +0 -295
- package/lib/entity/AcDbViewport.js.map +0 -1
- package/lib/entity/AcDbWipeout.d.ts +0 -39
- package/lib/entity/AcDbWipeout.d.ts.map +0 -1
- package/lib/entity/AcDbWipeout.js +0 -70
- package/lib/entity/AcDbWipeout.js.map +0 -1
- package/lib/entity/AcDbXline.d.ts +0 -151
- package/lib/entity/AcDbXline.d.ts.map +0 -1
- package/lib/entity/AcDbXline.js +0 -209
- package/lib/entity/AcDbXline.js.map +0 -1
- package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts +0 -92
- package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDb3PointAngularDimension.js +0 -157
- package/lib/entity/dimension/AcDb3PointAngularDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbAlignedDimension.d.ts +0 -220
- package/lib/entity/dimension/AcDbAlignedDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbAlignedDimension.js +0 -341
- package/lib/entity/dimension/AcDbAlignedDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbArcDimension.d.ts +0 -94
- package/lib/entity/dimension/AcDbArcDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbArcDimension.js +0 -159
- package/lib/entity/dimension/AcDbArcDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbDiametricDimension.d.ts +0 -145
- package/lib/entity/dimension/AcDbDiametricDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbDiametricDimension.js +0 -275
- package/lib/entity/dimension/AcDbDiametricDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbDimension.d.ts +0 -257
- package/lib/entity/dimension/AcDbDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbDimension.js +0 -466
- package/lib/entity/dimension/AcDbDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbOrdinateDimension.d.ts +0 -78
- package/lib/entity/dimension/AcDbOrdinateDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbOrdinateDimension.js +0 -133
- package/lib/entity/dimension/AcDbOrdinateDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbRadialDimension.d.ts +0 -214
- package/lib/entity/dimension/AcDbRadialDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbRadialDimension.js +0 -288
- package/lib/entity/dimension/AcDbRadialDimension.js.map +0 -1
- package/lib/entity/dimension/index.d.ts +0 -8
- package/lib/entity/dimension/index.d.ts.map +0 -1
- package/lib/entity/dimension/index.js +0 -8
- package/lib/entity/dimension/index.js.map +0 -1
- package/lib/entity/index.d.ts +0 -24
- package/lib/entity/index.d.ts.map +0 -1
- package/lib/entity/index.js +0 -24
- package/lib/entity/index.js.map +0 -1
- package/lib/index.d.ts +0 -10
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -10
- package/lib/index.js.map +0 -1
- package/lib/misc/AcDbAngleUnits.d.ts +0 -20
- package/lib/misc/AcDbAngleUnits.d.ts.map +0 -1
- package/lib/misc/AcDbAngleUnits.js +0 -21
- package/lib/misc/AcDbAngleUnits.js.map +0 -1
- package/lib/misc/AcDbCodePage.d.ts +0 -50
- package/lib/misc/AcDbCodePage.d.ts.map +0 -1
- package/lib/misc/AcDbCodePage.js +0 -100
- package/lib/misc/AcDbCodePage.js.map +0 -1
- package/lib/misc/AcDbConstants.d.ts +0 -24
- package/lib/misc/AcDbConstants.d.ts.map +0 -1
- package/lib/misc/AcDbConstants.js +0 -24
- package/lib/misc/AcDbConstants.js.map +0 -1
- package/lib/misc/AcDbDimArrowType.d.ts +0 -89
- package/lib/misc/AcDbDimArrowType.d.ts.map +0 -1
- package/lib/misc/AcDbDimArrowType.js +0 -90
- package/lib/misc/AcDbDimArrowType.js.map +0 -1
- package/lib/misc/AcDbObjectIterator.d.ts +0 -55
- package/lib/misc/AcDbObjectIterator.d.ts.map +0 -1
- package/lib/misc/AcDbObjectIterator.js +0 -67
- package/lib/misc/AcDbObjectIterator.js.map +0 -1
- package/lib/misc/AcDbOsnapMode.d.ts +0 -51
- package/lib/misc/AcDbOsnapMode.d.ts.map +0 -1
- package/lib/misc/AcDbOsnapMode.js +0 -52
- package/lib/misc/AcDbOsnapMode.js.map +0 -1
- package/lib/misc/AcDbRenderingCache.d.ts +0 -141
- package/lib/misc/AcDbRenderingCache.d.ts.map +0 -1
- package/lib/misc/AcDbRenderingCache.js +0 -239
- package/lib/misc/AcDbRenderingCache.js.map +0 -1
- package/lib/misc/AcDbUnitsValue.d.ts +0 -101
- package/lib/misc/AcDbUnitsValue.d.ts.map +0 -1
- package/lib/misc/AcDbUnitsValue.js +0 -121
- package/lib/misc/AcDbUnitsValue.js.map +0 -1
- package/lib/misc/index.d.ts +0 -9
- package/lib/misc/index.d.ts.map +0 -1
- package/lib/misc/index.js +0 -9
- package/lib/misc/index.js.map +0 -1
- package/lib/object/AcDbDictionary.d.ts +0 -178
- package/lib/object/AcDbDictionary.d.ts.map +0 -1
- package/lib/object/AcDbDictionary.js +0 -264
- package/lib/object/AcDbDictionary.js.map +0 -1
- package/lib/object/AcDbRasterImageDef.d.ts +0 -54
- package/lib/object/AcDbRasterImageDef.d.ts.map +0 -1
- package/lib/object/AcDbRasterImageDef.js +0 -82
- package/lib/object/AcDbRasterImageDef.js.map +0 -1
- package/lib/object/index.d.ts +0 -4
- package/lib/object/index.d.ts.map +0 -1
- package/lib/object/index.js +0 -4
- package/lib/object/index.js.map +0 -1
- package/lib/object/layout/AcDbLayout.d.ts +0 -190
- package/lib/object/layout/AcDbLayout.d.ts.map +0 -1
- package/lib/object/layout/AcDbLayout.js +0 -253
- package/lib/object/layout/AcDbLayout.js.map +0 -1
- package/lib/object/layout/AcDbLayoutDictionary.d.ts +0 -47
- package/lib/object/layout/AcDbLayoutDictionary.d.ts.map +0 -1
- package/lib/object/layout/AcDbLayoutDictionary.js +0 -122
- package/lib/object/layout/AcDbLayoutDictionary.js.map +0 -1
- package/lib/object/layout/AcDbLayoutManager.d.ts +0 -188
- package/lib/object/layout/AcDbLayoutManager.d.ts.map +0 -1
- package/lib/object/layout/AcDbLayoutManager.js +0 -245
- package/lib/object/layout/AcDbLayoutManager.js.map +0 -1
- package/lib/object/layout/index.d.ts +0 -4
- package/lib/object/layout/index.d.ts.map +0 -1
- package/lib/object/layout/index.js +0 -4
- package/lib/object/layout/index.js.map +0 -1
package/lib/entity/AcDbLine.js
DELETED
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
import { AcGeLine3d, AcGePoint3d } from '@mlightcad/geometry-engine';
|
|
17
|
-
import { AcDbOsnapMode } from '../misc/AcDbOsnapMode';
|
|
18
|
-
import { AcDbCurve } from './AcDbCurve';
|
|
19
|
-
/**
|
|
20
|
-
* Represents a line entity in AutoCAD.
|
|
21
|
-
*
|
|
22
|
-
* A line is a 3D geometric object defined by its start point and end point.
|
|
23
|
-
* Lines are fundamental drawing entities that can be used to create straight
|
|
24
|
-
* line segments in 2D or 3D space.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```typescript
|
|
28
|
-
* // Create a line from point (0,0,0) to point (10,10,0)
|
|
29
|
-
* const line = new AcDbLine(
|
|
30
|
-
* new AcGePoint3d(0, 0, 0),
|
|
31
|
-
* new AcGePoint3d(10, 10, 0)
|
|
32
|
-
* );
|
|
33
|
-
*
|
|
34
|
-
* // Access line properties
|
|
35
|
-
* console.log(`Start point: ${line.startPoint}`);
|
|
36
|
-
* console.log(`End point: ${line.endPoint}`);
|
|
37
|
-
* console.log(`Mid point: ${line.midPoint}`);
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
var AcDbLine = /** @class */ (function (_super) {
|
|
41
|
-
__extends(AcDbLine, _super);
|
|
42
|
-
/**
|
|
43
|
-
* Creates a new line entity.
|
|
44
|
-
*
|
|
45
|
-
* This constructor initializes the line object with the specified start and end points.
|
|
46
|
-
* Both points must be in World Coordinate System (WCS) coordinates.
|
|
47
|
-
*
|
|
48
|
-
* @param start - The starting point of the line in WCS coordinates
|
|
49
|
-
* @param end - The ending point of the line in WCS coordinates
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```typescript
|
|
53
|
-
* const line = new AcDbLine(
|
|
54
|
-
* new AcGePoint3d(0, 0, 0),
|
|
55
|
-
* new AcGePoint3d(100, 50, 0)
|
|
56
|
-
* );
|
|
57
|
-
* ```
|
|
58
|
-
*/
|
|
59
|
-
function AcDbLine(start, end) {
|
|
60
|
-
var _this = _super.call(this) || this;
|
|
61
|
-
_this._geo = new AcGeLine3d(start, end);
|
|
62
|
-
return _this;
|
|
63
|
-
}
|
|
64
|
-
Object.defineProperty(AcDbLine.prototype, "startPoint", {
|
|
65
|
-
/**
|
|
66
|
-
* Gets the starting point of this line.
|
|
67
|
-
*
|
|
68
|
-
* @returns The starting point as a 3D point
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* ```typescript
|
|
72
|
-
* const startPoint = line.startPoint;
|
|
73
|
-
* console.log(`Line starts at: ${startPoint.x}, ${startPoint.y}, ${startPoint.z}`);
|
|
74
|
-
* ```
|
|
75
|
-
*/
|
|
76
|
-
get: function () {
|
|
77
|
-
return this._geo.startPoint;
|
|
78
|
-
},
|
|
79
|
-
/**
|
|
80
|
-
* Sets the starting point of this line.
|
|
81
|
-
*
|
|
82
|
-
* @param value - The new starting point
|
|
83
|
-
*
|
|
84
|
-
* @example
|
|
85
|
-
* ```typescript
|
|
86
|
-
* line.startPoint = new AcGePoint3d(5, 5, 0);
|
|
87
|
-
* ```
|
|
88
|
-
*/
|
|
89
|
-
set: function (value) {
|
|
90
|
-
this._geo.startPoint = value;
|
|
91
|
-
},
|
|
92
|
-
enumerable: false,
|
|
93
|
-
configurable: true
|
|
94
|
-
});
|
|
95
|
-
Object.defineProperty(AcDbLine.prototype, "endPoint", {
|
|
96
|
-
/**
|
|
97
|
-
* Gets the ending point of this line.
|
|
98
|
-
*
|
|
99
|
-
* @returns The ending point as a 3D point
|
|
100
|
-
*
|
|
101
|
-
* @example
|
|
102
|
-
* ```typescript
|
|
103
|
-
* const endPoint = line.endPoint;
|
|
104
|
-
* console.log(`Line ends at: ${endPoint.x}, ${endPoint.y}, ${endPoint.z}`);
|
|
105
|
-
* ```
|
|
106
|
-
*/
|
|
107
|
-
get: function () {
|
|
108
|
-
return this._geo.endPoint;
|
|
109
|
-
},
|
|
110
|
-
/**
|
|
111
|
-
* Sets the ending point of this line.
|
|
112
|
-
*
|
|
113
|
-
* @param value - The new ending point
|
|
114
|
-
*
|
|
115
|
-
* @example
|
|
116
|
-
* ```typescript
|
|
117
|
-
* line.endPoint = new AcGePoint3d(15, 15, 0);
|
|
118
|
-
* ```
|
|
119
|
-
*/
|
|
120
|
-
set: function (value) {
|
|
121
|
-
this._geo.endPoint = value;
|
|
122
|
-
},
|
|
123
|
-
enumerable: false,
|
|
124
|
-
configurable: true
|
|
125
|
-
});
|
|
126
|
-
Object.defineProperty(AcDbLine.prototype, "midPoint", {
|
|
127
|
-
/**
|
|
128
|
-
* Gets the middle point of this line.
|
|
129
|
-
*
|
|
130
|
-
* The middle point is calculated as the midpoint between the start and end points.
|
|
131
|
-
*
|
|
132
|
-
* @returns The middle point as a 3D point
|
|
133
|
-
*
|
|
134
|
-
* @example
|
|
135
|
-
* ```typescript
|
|
136
|
-
* const midPoint = line.midPoint;
|
|
137
|
-
* console.log(`Line midpoint: ${midPoint.x}, ${midPoint.y}, ${midPoint.z}`);
|
|
138
|
-
* ```
|
|
139
|
-
*/
|
|
140
|
-
get: function () {
|
|
141
|
-
return this._geo.midPoint;
|
|
142
|
-
},
|
|
143
|
-
enumerable: false,
|
|
144
|
-
configurable: true
|
|
145
|
-
});
|
|
146
|
-
Object.defineProperty(AcDbLine.prototype, "geometricExtents", {
|
|
147
|
-
/**
|
|
148
|
-
* Gets the geometric extents (bounding box) of this line.
|
|
149
|
-
*
|
|
150
|
-
* @returns The bounding box that encompasses the entire line
|
|
151
|
-
*
|
|
152
|
-
* @example
|
|
153
|
-
* ```typescript
|
|
154
|
-
* const extents = line.geometricExtents;
|
|
155
|
-
* console.log(`Line bounds: ${extents.minPoint} to ${extents.maxPoint}`);
|
|
156
|
-
* ```
|
|
157
|
-
*/
|
|
158
|
-
get: function () {
|
|
159
|
-
return this._geo.box;
|
|
160
|
-
},
|
|
161
|
-
enumerable: false,
|
|
162
|
-
configurable: true
|
|
163
|
-
});
|
|
164
|
-
Object.defineProperty(AcDbLine.prototype, "closed", {
|
|
165
|
-
/**
|
|
166
|
-
* Gets whether this line is closed.
|
|
167
|
-
*
|
|
168
|
-
* Lines are always open entities, so this always returns false.
|
|
169
|
-
*
|
|
170
|
-
* @returns Always false for lines
|
|
171
|
-
*/
|
|
172
|
-
get: function () {
|
|
173
|
-
return false;
|
|
174
|
-
},
|
|
175
|
-
enumerable: false,
|
|
176
|
-
configurable: true
|
|
177
|
-
});
|
|
178
|
-
/**
|
|
179
|
-
* Gets the grip points for this line.
|
|
180
|
-
*
|
|
181
|
-
* Grip points are control points that can be used to modify the line.
|
|
182
|
-
* For a line, the grip points are the midpoint, start point, and end point.
|
|
183
|
-
*
|
|
184
|
-
* @returns Array of grip points (midpoint, start point, end point)
|
|
185
|
-
*
|
|
186
|
-
* @example
|
|
187
|
-
* ```typescript
|
|
188
|
-
* const gripPoints = line.subGetGripPoints();
|
|
189
|
-
* // gripPoints contains: [midPoint, startPoint, endPoint]
|
|
190
|
-
* ```
|
|
191
|
-
*/
|
|
192
|
-
AcDbLine.prototype.subGetGripPoints = function () {
|
|
193
|
-
var gripPoints = new Array();
|
|
194
|
-
gripPoints.push(this.midPoint);
|
|
195
|
-
gripPoints.push(this.startPoint);
|
|
196
|
-
gripPoints.push(this.endPoint);
|
|
197
|
-
return gripPoints;
|
|
198
|
-
};
|
|
199
|
-
/**
|
|
200
|
-
* Gets the object snap points for this line.
|
|
201
|
-
*
|
|
202
|
-
* Object snap points are precise points that can be used for positioning
|
|
203
|
-
* when drawing or editing. This method provides snap points based on the
|
|
204
|
-
* specified snap mode.
|
|
205
|
-
*
|
|
206
|
-
* @param osnapMode - The object snap mode (Endpoint, Midpoint, Nearest, Perpendicular, Tangent)
|
|
207
|
-
* @param _gsSelectionMark - The selection mark (unused)
|
|
208
|
-
* @param pickPoint - The point where the user picked
|
|
209
|
-
* @param _lastPoint - The last point (unused)
|
|
210
|
-
* @param snapPoints - Array to populate with snap points
|
|
211
|
-
*
|
|
212
|
-
* @example
|
|
213
|
-
* ```typescript
|
|
214
|
-
* const snapPoints: AcGePoint3d[] = [];
|
|
215
|
-
* line.subGetOsnapPoints(AcDbOsnapMode.EndPoint, 0, pickPoint, lastPoint, snapPoints);
|
|
216
|
-
* // snapPoints now contains the start and end points
|
|
217
|
-
* ```
|
|
218
|
-
*/
|
|
219
|
-
AcDbLine.prototype.subGetOsnapPoints = function (osnapMode, _gsSelectionMark, pickPoint, _lastPoint, snapPoints) {
|
|
220
|
-
var startPoint = this.startPoint;
|
|
221
|
-
var endPoint = this.endPoint;
|
|
222
|
-
switch (osnapMode) {
|
|
223
|
-
case AcDbOsnapMode.EndPoint:
|
|
224
|
-
snapPoints.push(startPoint);
|
|
225
|
-
snapPoints.push(endPoint);
|
|
226
|
-
break;
|
|
227
|
-
case AcDbOsnapMode.MidPoint:
|
|
228
|
-
snapPoints.push(this.midPoint);
|
|
229
|
-
break;
|
|
230
|
-
case AcDbOsnapMode.Nearest:
|
|
231
|
-
// Nearest snap: project the pick point onto the line and return that point
|
|
232
|
-
{
|
|
233
|
-
var projectedPoint = this._geo.project(pickPoint);
|
|
234
|
-
snapPoints.push(projectedPoint);
|
|
235
|
-
}
|
|
236
|
-
break;
|
|
237
|
-
case AcDbOsnapMode.Perpendicular:
|
|
238
|
-
// Perpendicular snap: find a perpendicular point from the pick point to the line
|
|
239
|
-
{
|
|
240
|
-
var perpPoint = this._geo.perpPoint(pickPoint);
|
|
241
|
-
snapPoints.push(perpPoint);
|
|
242
|
-
}
|
|
243
|
-
break;
|
|
244
|
-
case AcDbOsnapMode.Tangent:
|
|
245
|
-
// Tangent snap: simply return an endpoint (depends on the geometry being connected)
|
|
246
|
-
snapPoints.push(startPoint); // Example: return the start point as a tangent point
|
|
247
|
-
break;
|
|
248
|
-
default:
|
|
249
|
-
break;
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
/**
|
|
253
|
-
* Transforms this line by the specified matrix.
|
|
254
|
-
*
|
|
255
|
-
* This method applies a geometric transformation to the line, updating
|
|
256
|
-
* both the start and end points according to the transformation matrix.
|
|
257
|
-
*
|
|
258
|
-
* @param matrix - The transformation matrix to apply
|
|
259
|
-
* @returns This line after transformation
|
|
260
|
-
*
|
|
261
|
-
* @example
|
|
262
|
-
* ```typescript
|
|
263
|
-
* const translationMatrix = AcGeMatrix3d.translation(10, 0, 0);
|
|
264
|
-
* line.transformBy(translationMatrix);
|
|
265
|
-
* // Line is now translated 10 units in the X direction
|
|
266
|
-
* ```
|
|
267
|
-
*/
|
|
268
|
-
AcDbLine.prototype.transformBy = function (matrix) {
|
|
269
|
-
this._geo.transform(matrix);
|
|
270
|
-
return this;
|
|
271
|
-
};
|
|
272
|
-
/**
|
|
273
|
-
* Draws this line using the specified renderer.
|
|
274
|
-
*
|
|
275
|
-
* This method renders the line as a series of connected line segments
|
|
276
|
-
* using the line's current style properties.
|
|
277
|
-
*
|
|
278
|
-
* @param renderer - The renderer to use for drawing
|
|
279
|
-
* @returns The rendered line entity, or undefined if drawing failed
|
|
280
|
-
*
|
|
281
|
-
* @example
|
|
282
|
-
* ```typescript
|
|
283
|
-
* const renderedLine = line.draw(renderer);
|
|
284
|
-
* ```
|
|
285
|
-
*/
|
|
286
|
-
AcDbLine.prototype.draw = function (renderer) {
|
|
287
|
-
var start = this.startPoint;
|
|
288
|
-
var end = this.endPoint;
|
|
289
|
-
var points = [
|
|
290
|
-
new AcGePoint3d(start.x, start.y, 0),
|
|
291
|
-
new AcGePoint3d(end.x, end.y, 0)
|
|
292
|
-
];
|
|
293
|
-
return renderer.lines(points, this.lineStyle);
|
|
294
|
-
};
|
|
295
|
-
/** The entity type name */
|
|
296
|
-
AcDbLine.typeName = 'Line';
|
|
297
|
-
return AcDbLine;
|
|
298
|
-
}(AcDbCurve));
|
|
299
|
-
export { AcDbLine };
|
|
300
|
-
//# sourceMappingURL=AcDbLine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbLine.js","sourceRoot":"","sources":["../../src/entity/AcDbLine.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAEL,UAAU,EAEV,WAAW,EAEZ,MAAM,4BAA4B,CAAA;AAGnC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IAA8B,4BAAS;IAOrC;;;;;;;;;;;;;;;;OAgBG;IACH,kBAAY,KAAsB,EAAE,GAAoB;QACtD,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,IAAI,GAAG,IAAI,UAAU,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;;IACxC,CAAC;IAaD,sBAAI,gCAAU;QAXd;;;;;;;;;;WAUG;aACH;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAA;QAC7B,CAAC;QAED;;;;;;;;;WASG;aACH,UAAe,KAAsB;YACnC,IAAI,CAAC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAA;QAC9B,CAAC;;;OAdA;IA2BD,sBAAI,8BAAQ;QAXZ;;;;;;;;;;WAUG;aACH;YACE,OAAO,IAAI,CAA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AAS,CAAC,CAAA;IAC/C,CAAC;IA/PD,2BAA2B;IACX,iBAAQ,GAAW,MAAM,CAAA;IA+P3C,eAAC;CAAA,AAjQD,CAA8B,SAAS,GAiQtC;SAjQY,QAAQ"}
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
import { AcGeBox3d, AcGePoint3dLike, AcGeVector3d } from '@mlightcad/geometry-engine';
|
|
2
|
-
import { AcGiRenderer } from '@mlightcad/graphic-interface';
|
|
3
|
-
import { AcGiMTextAttachmentPoint, AcGiMTextFlowDirection } from '@mlightcad/graphic-interface';
|
|
4
|
-
import { AcDbEntity } from './AcDbEntity';
|
|
5
|
-
/**
|
|
6
|
-
* Represents a multiline text (mtext) entity in AutoCAD.
|
|
7
|
-
*
|
|
8
|
-
* A multiline text entity is a 2D geometric object that displays formatted text
|
|
9
|
-
* with support for multiple lines, word wrapping, and rich text formatting.
|
|
10
|
-
* MText entities are more advanced than regular text entities and support
|
|
11
|
-
* features like background fills, line spacing, and attachment points.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```typescript
|
|
15
|
-
* // Create a multiline text entity
|
|
16
|
-
* const mtext = new AcDbMText();
|
|
17
|
-
* mtext.contents = "This is a\nmultiline text\nwith formatting";
|
|
18
|
-
* mtext.height = 2.5;
|
|
19
|
-
* mtext.width = 20;
|
|
20
|
-
* mtext.location = new AcGePoint3d(0, 0, 0);
|
|
21
|
-
* mtext.attachmentPoint = AcGiMTextAttachmentPoint.TopLeft;
|
|
22
|
-
*
|
|
23
|
-
* // Access mtext properties
|
|
24
|
-
* console.log(`Contents: ${mtext.contents}`);
|
|
25
|
-
* console.log(`Height: ${mtext.height}`);
|
|
26
|
-
* console.log(`Width: ${mtext.width}`);
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
export declare class AcDbMText extends AcDbEntity {
|
|
30
|
-
/** The entity type name */
|
|
31
|
-
static typeName: string;
|
|
32
|
-
/** The height of the text */
|
|
33
|
-
private _height;
|
|
34
|
-
/** The maximum width for word wrap formatting */
|
|
35
|
-
private _width;
|
|
36
|
-
/** The text contents */
|
|
37
|
-
private _contents;
|
|
38
|
-
/** The line spacing style */
|
|
39
|
-
private _lineSpacingStyle;
|
|
40
|
-
/** The line spacing factor */
|
|
41
|
-
private _lineSpacingFactor;
|
|
42
|
-
/** Whether background fill is enabled */
|
|
43
|
-
private _backgroundFill;
|
|
44
|
-
/** The background fill color */
|
|
45
|
-
private _backgroundFillColor;
|
|
46
|
-
/** The background scale factor */
|
|
47
|
-
private _backgroundScaleFactor;
|
|
48
|
-
/** The background fill transparency */
|
|
49
|
-
private _backgroundFillTransparency;
|
|
50
|
-
/** The rotation angle in radians */
|
|
51
|
-
private _rotation;
|
|
52
|
-
/** The text style name */
|
|
53
|
-
private _styleName;
|
|
54
|
-
/** The location point of the text */
|
|
55
|
-
private _location;
|
|
56
|
-
/** The attachment point for the text */
|
|
57
|
-
private _attachmentPoint;
|
|
58
|
-
/** The direction vector of the text */
|
|
59
|
-
private _direction;
|
|
60
|
-
/** The drawing direction of the text */
|
|
61
|
-
private _drawingDirection;
|
|
62
|
-
/**
|
|
63
|
-
* Creates a new multiline text entity.
|
|
64
|
-
*
|
|
65
|
-
* This constructor initializes an mtext entity with default values.
|
|
66
|
-
* The contents are empty, height and width are 0, and the location is at the origin.
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* ```typescript
|
|
70
|
-
* const mtext = new AcDbMText();
|
|
71
|
-
* mtext.contents = "Sample multiline text";
|
|
72
|
-
* mtext.height = 3.0;
|
|
73
|
-
* mtext.width = 15;
|
|
74
|
-
* ```
|
|
75
|
-
*/
|
|
76
|
-
constructor();
|
|
77
|
-
/**
|
|
78
|
-
* Gets the contents of the mtext object.
|
|
79
|
-
*
|
|
80
|
-
* This returns a string that contains the contents of the mtext object.
|
|
81
|
-
* Formatting data used for word wrap calculations is removed.
|
|
82
|
-
*
|
|
83
|
-
* @returns The text contents
|
|
84
|
-
*
|
|
85
|
-
* @example
|
|
86
|
-
* ```typescript
|
|
87
|
-
* const contents = mtext.contents;
|
|
88
|
-
* console.log(`Text contents: ${contents}`);
|
|
89
|
-
* ```
|
|
90
|
-
*/
|
|
91
|
-
get contents(): string;
|
|
92
|
-
/**
|
|
93
|
-
* Sets the contents of the mtext object.
|
|
94
|
-
*
|
|
95
|
-
* @param value - The new text contents
|
|
96
|
-
*
|
|
97
|
-
* @example
|
|
98
|
-
* ```typescript
|
|
99
|
-
* mtext.contents = "New multiline\ntext content";
|
|
100
|
-
* ```
|
|
101
|
-
*/
|
|
102
|
-
set contents(value: string);
|
|
103
|
-
/**
|
|
104
|
-
* Gets the height of the text.
|
|
105
|
-
*
|
|
106
|
-
* @returns The text height
|
|
107
|
-
*
|
|
108
|
-
* @example
|
|
109
|
-
* ```typescript
|
|
110
|
-
* const height = mtext.height;
|
|
111
|
-
* console.log(`Text height: ${height}`);
|
|
112
|
-
* ```
|
|
113
|
-
*/
|
|
114
|
-
get height(): number;
|
|
115
|
-
/**
|
|
116
|
-
* Sets the height of the text.
|
|
117
|
-
*
|
|
118
|
-
* @param value - The new text height
|
|
119
|
-
*
|
|
120
|
-
* @example
|
|
121
|
-
* ```typescript
|
|
122
|
-
* mtext.height = 5.0;
|
|
123
|
-
* ```
|
|
124
|
-
*/
|
|
125
|
-
set height(value: number);
|
|
126
|
-
/**
|
|
127
|
-
* Gets the maximum width setting used by the MText object for word wrap formatting.
|
|
128
|
-
*
|
|
129
|
-
* It is possible that none of the lines resulting from word wrap formatting will
|
|
130
|
-
* reach this width value. Words which exceed this width value will not be broken,
|
|
131
|
-
* but will extend beyond the given width.
|
|
132
|
-
*
|
|
133
|
-
* @returns The maximum width for word wrap
|
|
134
|
-
*
|
|
135
|
-
* @example
|
|
136
|
-
* ```typescript
|
|
137
|
-
* const width = mtext.width;
|
|
138
|
-
* console.log(`Text width: ${width}`);
|
|
139
|
-
* ```
|
|
140
|
-
*/
|
|
141
|
-
get width(): number;
|
|
142
|
-
/**
|
|
143
|
-
* Sets the maximum width setting used by the MText object for word wrap formatting.
|
|
144
|
-
*
|
|
145
|
-
* @param value - The new maximum width for word wrap
|
|
146
|
-
*
|
|
147
|
-
* @example
|
|
148
|
-
* ```typescript
|
|
149
|
-
* mtext.width = 25;
|
|
150
|
-
* ```
|
|
151
|
-
*/
|
|
152
|
-
set width(value: number);
|
|
153
|
-
/**
|
|
154
|
-
* Gets the rotation angle of the text.
|
|
155
|
-
*
|
|
156
|
-
* The rotation angle is relative to the X axis of the text's OCS, with positive
|
|
157
|
-
* angles going counterclockwise when looking down the Z axis toward the origin.
|
|
158
|
-
*
|
|
159
|
-
* @returns The rotation angle in radians
|
|
160
|
-
*
|
|
161
|
-
* @example
|
|
162
|
-
* ```typescript
|
|
163
|
-
* const rotation = mtext.rotation;
|
|
164
|
-
* console.log(`Rotation: ${rotation} radians (${rotation * 180 / Math.PI} degrees)`);
|
|
165
|
-
* ```
|
|
166
|
-
*/
|
|
167
|
-
get rotation(): number;
|
|
168
|
-
set rotation(value: number);
|
|
169
|
-
/**
|
|
170
|
-
* The line spacing factor (a value between 0.25 and 4.00).
|
|
171
|
-
*/
|
|
172
|
-
get lineSpacingFactor(): number;
|
|
173
|
-
set lineSpacingFactor(value: number);
|
|
174
|
-
/**
|
|
175
|
-
* The line spacing style.
|
|
176
|
-
*/
|
|
177
|
-
get lineSpacingStyle(): number;
|
|
178
|
-
set lineSpacingStyle(value: number);
|
|
179
|
-
/**
|
|
180
|
-
* Toggle the background fill on or off. If it is true, background color is turned off, and no
|
|
181
|
-
* background fill color has been specified, this function sets the background fill color to
|
|
182
|
-
* an RGB value of 200,200,200.
|
|
183
|
-
*/
|
|
184
|
-
get backgroundFill(): boolean;
|
|
185
|
-
set backgroundFill(value: boolean);
|
|
186
|
-
/**
|
|
187
|
-
* The background fill color. This property is valid only if background fill is enable.
|
|
188
|
-
*/
|
|
189
|
-
get backgroundFillColor(): number;
|
|
190
|
-
set backgroundFillColor(value: number);
|
|
191
|
-
/**
|
|
192
|
-
* The background fill transparency. This property is valid only if background fill is enable.
|
|
193
|
-
*/
|
|
194
|
-
get backgroundFillTransparency(): number;
|
|
195
|
-
set backgroundFillTransparency(value: number);
|
|
196
|
-
/**
|
|
197
|
-
* The background scale factor.
|
|
198
|
-
*/
|
|
199
|
-
get backgroundScaleFactor(): number;
|
|
200
|
-
set backgroundScaleFactor(value: number);
|
|
201
|
-
/**
|
|
202
|
-
* The style name stored in text ttyle table record and used by this text entity
|
|
203
|
-
*/
|
|
204
|
-
get styleName(): string;
|
|
205
|
-
set styleName(value: string);
|
|
206
|
-
/**
|
|
207
|
-
* The insertion point of this mtext entity.
|
|
208
|
-
*/
|
|
209
|
-
get location(): AcGePoint3dLike;
|
|
210
|
-
set location(value: AcGePoint3dLike);
|
|
211
|
-
/**
|
|
212
|
-
* The attachment point value which determines how the text will be oriented around the insertion point
|
|
213
|
-
* of the mtext object. For example, if the attachment point is AcGiAttachmentPoint.MiddleCenter, then
|
|
214
|
-
* the text body will be displayed such that the insertion point appears at the geometric center of the
|
|
215
|
-
* text body.
|
|
216
|
-
*/
|
|
217
|
-
get attachmentPoint(): AcGiMTextAttachmentPoint;
|
|
218
|
-
set attachmentPoint(value: AcGiMTextAttachmentPoint);
|
|
219
|
-
/**
|
|
220
|
-
* Represent the X axis ("horizontal") for the text. This direction vector is used to determine the text
|
|
221
|
-
* flow direction.
|
|
222
|
-
*/
|
|
223
|
-
get direction(): AcGeVector3d;
|
|
224
|
-
set direction(value: AcGeVector3d);
|
|
225
|
-
get drawingDirection(): AcGiMTextFlowDirection;
|
|
226
|
-
set drawingDirection(value: AcGiMTextFlowDirection);
|
|
227
|
-
/**
|
|
228
|
-
* @inheritdoc
|
|
229
|
-
*/
|
|
230
|
-
get geometricExtents(): AcGeBox3d;
|
|
231
|
-
private getTextStyle;
|
|
232
|
-
/**
|
|
233
|
-
* Draws this entity using the specified renderer.
|
|
234
|
-
*
|
|
235
|
-
* @param renderer - The renderer to use for drawing
|
|
236
|
-
* @param delay - The flag to delay creating one rendered entity and just create one dummy
|
|
237
|
-
* entity. Renderer can delay heavy calculation operation to avoid blocking UI when this flag
|
|
238
|
-
* is true.
|
|
239
|
-
* @returns The rendered entity, or undefined if drawing failed
|
|
240
|
-
*
|
|
241
|
-
* @example
|
|
242
|
-
* ```typescript
|
|
243
|
-
* const renderedEntity = entity.draw(renderer);
|
|
244
|
-
* ```
|
|
245
|
-
*/
|
|
246
|
-
draw(renderer: AcGiRenderer, delay?: boolean): import("@mlightcad/graphic-interface").AcGiEntity;
|
|
247
|
-
}
|
|
248
|
-
//# sourceMappingURL=AcDbMText.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbMText.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbMText.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,eAAe,EACf,YAAY,EACb,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAEL,YAAY,EAEb,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,wBAAwB,EAExB,sBAAsB,EACvB,MAAM,8BAA8B,CAAA;AAErC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,SAAU,SAAQ,UAAU;IACvC,2BAA2B;IAC3B,OAAgB,QAAQ,EAAE,MAAM,CAAU;IAE1C,6BAA6B;IAC7B,OAAO,CAAC,OAAO,CAAQ;IACvB,iDAAiD;IACjD,OAAO,CAAC,MAAM,CAAQ;IACtB,wBAAwB;IACxB,OAAO,CAAC,SAAS,CAAQ;IACzB,6BAA6B;IAC7B,OAAO,CAAC,iBAAiB,CAAQ;IACjC,8BAA8B;IAC9B,OAAO,CAAC,kBAAkB,CAAQ;IAClC,yCAAyC;IACzC,OAAO,CAAC,eAAe,CAAS;IAChC,gCAAgC;IAChC,OAAO,CAAC,oBAAoB,CAAQ;IACpC,kCAAkC;IAClC,OAAO,CAAC,s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