@mlightcad/data-model 1.0.0

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.
Files changed (301) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +116 -0
  3. package/dist/data-model.js +19887 -0
  4. package/dist/data-model.umd.cjs +5 -0
  5. package/lib/base/AcDbHostApplicationServices.d.ts +30 -0
  6. package/lib/base/AcDbHostApplicationServices.d.ts.map +1 -0
  7. package/lib/base/AcDbHostApplicationServices.js +54 -0
  8. package/lib/base/AcDbHostApplicationServices.js.map +1 -0
  9. package/lib/base/AcDbObject.d.ts +70 -0
  10. package/lib/base/AcDbObject.d.ts.map +1 -0
  11. package/lib/base/AcDbObject.js +113 -0
  12. package/lib/base/AcDbObject.js.map +1 -0
  13. package/lib/base/index.d.ts +3 -0
  14. package/lib/base/index.d.ts.map +1 -0
  15. package/lib/base/index.js +3 -0
  16. package/lib/base/index.js.map +1 -0
  17. package/lib/converter/AcDbBatchProcessing.d.ts +43 -0
  18. package/lib/converter/AcDbBatchProcessing.d.ts.map +1 -0
  19. package/lib/converter/AcDbBatchProcessing.js +165 -0
  20. package/lib/converter/AcDbBatchProcessing.js.map +1 -0
  21. package/lib/converter/AcDbDxfConverter.d.ts +39 -0
  22. package/lib/converter/AcDbDxfConverter.d.ts.map +1 -0
  23. package/lib/converter/AcDbDxfConverter.js +567 -0
  24. package/lib/converter/AcDbDxfConverter.js.map +1 -0
  25. package/lib/converter/AcDbDxfParseWorker.d.ts +2 -0
  26. package/lib/converter/AcDbDxfParseWorker.d.ts.map +1 -0
  27. package/lib/converter/AcDbDxfParseWorker.js +6 -0
  28. package/lib/converter/AcDbDxfParseWorker.js.map +1 -0
  29. package/lib/converter/AcDbEntitiyConverter.d.ts +36 -0
  30. package/lib/converter/AcDbEntitiyConverter.d.ts.map +1 -0
  31. package/lib/converter/AcDbEntitiyConverter.js +491 -0
  32. package/lib/converter/AcDbEntitiyConverter.js.map +1 -0
  33. package/lib/converter/AcDbObjectConverter.d.ts +9 -0
  34. package/lib/converter/AcDbObjectConverter.d.ts.map +1 -0
  35. package/lib/converter/AcDbObjectConverter.js +30 -0
  36. package/lib/converter/AcDbObjectConverter.js.map +1 -0
  37. package/lib/converter/index.d.ts +3 -0
  38. package/lib/converter/index.d.ts.map +1 -0
  39. package/lib/converter/index.js +3 -0
  40. package/lib/converter/index.js.map +1 -0
  41. package/lib/database/AcDbBlockTable.d.ts +15 -0
  42. package/lib/database/AcDbBlockTable.d.ts.map +1 -0
  43. package/lib/database/AcDbBlockTable.js +46 -0
  44. package/lib/database/AcDbBlockTable.js.map +1 -0
  45. package/lib/database/AcDbBlockTableRecord.d.ts +49 -0
  46. package/lib/database/AcDbBlockTableRecord.d.ts.map +1 -0
  47. package/lib/database/AcDbBlockTableRecord.js +108 -0
  48. package/lib/database/AcDbBlockTableRecord.js.map +1 -0
  49. package/lib/database/AcDbDatabase.d.ts +211 -0
  50. package/lib/database/AcDbDatabase.d.ts.map +1 -0
  51. package/lib/database/AcDbDatabase.js +395 -0
  52. package/lib/database/AcDbDatabase.js.map +1 -0
  53. package/lib/database/AcDbDatabaseConverter.d.ts +120 -0
  54. package/lib/database/AcDbDatabaseConverter.d.ts.map +1 -0
  55. package/lib/database/AcDbDatabaseConverter.js +376 -0
  56. package/lib/database/AcDbDatabaseConverter.js.map +1 -0
  57. package/lib/database/AcDbDatabaseConverterManager.d.ts +59 -0
  58. package/lib/database/AcDbDatabaseConverterManager.d.ts.map +1 -0
  59. package/lib/database/AcDbDatabaseConverterManager.js +98 -0
  60. package/lib/database/AcDbDatabaseConverterManager.js.map +1 -0
  61. package/lib/database/AcDbDatabaseConverterRegister.d.ts +54 -0
  62. package/lib/database/AcDbDatabaseConverterRegister.d.ts.map +1 -0
  63. package/lib/database/AcDbDatabaseConverterRegister.js +84 -0
  64. package/lib/database/AcDbDatabaseConverterRegister.js.map +1 -0
  65. package/lib/database/AcDbDimStyleTable.d.ts +11 -0
  66. package/lib/database/AcDbDimStyleTable.d.ts.map +1 -0
  67. package/lib/database/AcDbDimStyleTable.js +29 -0
  68. package/lib/database/AcDbDimStyleTable.js.map +1 -0
  69. package/lib/database/AcDbDimStyleTableRecord.d.ts +682 -0
  70. package/lib/database/AcDbDimStyleTableRecord.d.ts.map +1 -0
  71. package/lib/database/AcDbDimStyleTableRecord.js +1250 -0
  72. package/lib/database/AcDbDimStyleTableRecord.js.map +1 -0
  73. package/lib/database/AcDbLayerTable.d.ts +14 -0
  74. package/lib/database/AcDbLayerTable.d.ts.map +1 -0
  75. package/lib/database/AcDbLayerTable.js +55 -0
  76. package/lib/database/AcDbLayerTable.js.map +1 -0
  77. package/lib/database/AcDbLayerTableRecord.d.ts +98 -0
  78. package/lib/database/AcDbLayerTableRecord.d.ts.map +1 -0
  79. package/lib/database/AcDbLayerTableRecord.js +235 -0
  80. package/lib/database/AcDbLayerTableRecord.js.map +1 -0
  81. package/lib/database/AcDbLinetypeTable.d.ts +11 -0
  82. package/lib/database/AcDbLinetypeTable.d.ts.map +1 -0
  83. package/lib/database/AcDbLinetypeTable.js +29 -0
  84. package/lib/database/AcDbLinetypeTable.js.map +1 -0
  85. package/lib/database/AcDbLinetypeTableRecord.d.ts +47 -0
  86. package/lib/database/AcDbLinetypeTableRecord.d.ts.map +1 -0
  87. package/lib/database/AcDbLinetypeTableRecord.js +97 -0
  88. package/lib/database/AcDbLinetypeTableRecord.js.map +1 -0
  89. package/lib/database/AcDbSymbolTable.d.ts +74 -0
  90. package/lib/database/AcDbSymbolTable.d.ts.map +1 -0
  91. package/lib/database/AcDbSymbolTable.js +136 -0
  92. package/lib/database/AcDbSymbolTable.js.map +1 -0
  93. package/lib/database/AcDbSymbolTableRecord.d.ts +16 -0
  94. package/lib/database/AcDbSymbolTableRecord.d.ts.map +1 -0
  95. package/lib/database/AcDbSymbolTableRecord.js +44 -0
  96. package/lib/database/AcDbSymbolTableRecord.js.map +1 -0
  97. package/lib/database/AcDbTextStyleTable.d.ts +14 -0
  98. package/lib/database/AcDbTextStyleTable.d.ts.map +1 -0
  99. package/lib/database/AcDbTextStyleTable.js +78 -0
  100. package/lib/database/AcDbTextStyleTable.js.map +1 -0
  101. package/lib/database/AcDbTextStyleTableRecord.d.ts +67 -0
  102. package/lib/database/AcDbTextStyleTableRecord.d.ts.map +1 -0
  103. package/lib/database/AcDbTextStyleTableRecord.js +166 -0
  104. package/lib/database/AcDbTextStyleTableRecord.js.map +1 -0
  105. package/lib/database/AcDbViewportTable.d.ts +11 -0
  106. package/lib/database/AcDbViewportTable.d.ts.map +1 -0
  107. package/lib/database/AcDbViewportTable.js +29 -0
  108. package/lib/database/AcDbViewportTable.js.map +1 -0
  109. package/lib/database/AcDbViewportTableRecord.d.ts +89 -0
  110. package/lib/database/AcDbViewportTableRecord.d.ts.map +1 -0
  111. package/lib/database/AcDbViewportTableRecord.js +262 -0
  112. package/lib/database/AcDbViewportTableRecord.js.map +1 -0
  113. package/lib/database/index.d.ts +18 -0
  114. package/lib/database/index.d.ts.map +1 -0
  115. package/lib/database/index.js +18 -0
  116. package/lib/database/index.js.map +1 -0
  117. package/lib/entity/AcDbArc.d.ts +67 -0
  118. package/lib/entity/AcDbArc.d.ts.map +1 -0
  119. package/lib/entity/AcDbArc.js +154 -0
  120. package/lib/entity/AcDbArc.js.map +1 -0
  121. package/lib/entity/AcDbBlockReference.d.ts +54 -0
  122. package/lib/entity/AcDbBlockReference.d.ts.map +1 -0
  123. package/lib/entity/AcDbBlockReference.js +168 -0
  124. package/lib/entity/AcDbBlockReference.js.map +1 -0
  125. package/lib/entity/AcDbCircle.d.ts +51 -0
  126. package/lib/entity/AcDbCircle.d.ts.map +1 -0
  127. package/lib/entity/AcDbCircle.js +115 -0
  128. package/lib/entity/AcDbCircle.js.map +1 -0
  129. package/lib/entity/AcDbCurve.d.ts +9 -0
  130. package/lib/entity/AcDbCurve.d.ts.map +1 -0
  131. package/lib/entity/AcDbCurve.js +25 -0
  132. package/lib/entity/AcDbCurve.js.map +1 -0
  133. package/lib/entity/AcDbEllipse.d.ts +53 -0
  134. package/lib/entity/AcDbEllipse.d.ts.map +1 -0
  135. package/lib/entity/AcDbEllipse.js +119 -0
  136. package/lib/entity/AcDbEllipse.js.map +1 -0
  137. package/lib/entity/AcDbEntity.d.ts +103 -0
  138. package/lib/entity/AcDbEntity.d.ts.map +1 -0
  139. package/lib/entity/AcDbEntity.js +292 -0
  140. package/lib/entity/AcDbEntity.js.map +1 -0
  141. package/lib/entity/AcDbHatch.d.ts +116 -0
  142. package/lib/entity/AcDbHatch.d.ts.map +1 -0
  143. package/lib/entity/AcDbHatch.js +200 -0
  144. package/lib/entity/AcDbHatch.js.map +1 -0
  145. package/lib/entity/AcDbLeader.d.ts +94 -0
  146. package/lib/entity/AcDbLeader.d.ts.map +1 -0
  147. package/lib/entity/AcDbLeader.js +217 -0
  148. package/lib/entity/AcDbLeader.js.map +1 -0
  149. package/lib/entity/AcDbLine.d.ts +55 -0
  150. package/lib/entity/AcDbLine.d.ts.map +1 -0
  151. package/lib/entity/AcDbLine.js +158 -0
  152. package/lib/entity/AcDbLine.js.map +1 -0
  153. package/lib/entity/AcDbMText.d.ts +119 -0
  154. package/lib/entity/AcDbMText.d.ts.map +1 -0
  155. package/lib/entity/AcDbMText.js +300 -0
  156. package/lib/entity/AcDbMText.js.map +1 -0
  157. package/lib/entity/AcDbPoint.d.ts +32 -0
  158. package/lib/entity/AcDbPoint.d.ts.map +1 -0
  159. package/lib/entity/AcDbPoint.js +75 -0
  160. package/lib/entity/AcDbPoint.js.map +1 -0
  161. package/lib/entity/AcDbPolyline.d.ts +72 -0
  162. package/lib/entity/AcDbPolyline.d.ts.map +1 -0
  163. package/lib/entity/AcDbPolyline.js +154 -0
  164. package/lib/entity/AcDbPolyline.js.map +1 -0
  165. package/lib/entity/AcDbRasterImage.d.ts +163 -0
  166. package/lib/entity/AcDbRasterImage.d.ts.map +1 -0
  167. package/lib/entity/AcDbRasterImage.js +406 -0
  168. package/lib/entity/AcDbRasterImage.js.map +1 -0
  169. package/lib/entity/AcDbRay.d.ts +42 -0
  170. package/lib/entity/AcDbRay.d.ts.map +1 -0
  171. package/lib/entity/AcDbRay.js +102 -0
  172. package/lib/entity/AcDbRay.js.map +1 -0
  173. package/lib/entity/AcDbSpline.d.ts +37 -0
  174. package/lib/entity/AcDbSpline.d.ts.map +1 -0
  175. package/lib/entity/AcDbSpline.js +71 -0
  176. package/lib/entity/AcDbSpline.js.map +1 -0
  177. package/lib/entity/AcDbTable.d.ts +141 -0
  178. package/lib/entity/AcDbTable.d.ts.map +1 -0
  179. package/lib/entity/AcDbTable.js +358 -0
  180. package/lib/entity/AcDbTable.js.map +1 -0
  181. package/lib/entity/AcDbText.d.ts +110 -0
  182. package/lib/entity/AcDbText.d.ts.map +1 -0
  183. package/lib/entity/AcDbText.js +255 -0
  184. package/lib/entity/AcDbText.js.map +1 -0
  185. package/lib/entity/AcDbTrace.d.ts +64 -0
  186. package/lib/entity/AcDbTrace.d.ts.map +1 -0
  187. package/lib/entity/AcDbTrace.js +145 -0
  188. package/lib/entity/AcDbTrace.js.map +1 -0
  189. package/lib/entity/AcDbViewport.d.ts +58 -0
  190. package/lib/entity/AcDbViewport.d.ts.map +1 -0
  191. package/lib/entity/AcDbViewport.js +179 -0
  192. package/lib/entity/AcDbViewport.js.map +1 -0
  193. package/lib/entity/AcDbWipeout.d.ts +9 -0
  194. package/lib/entity/AcDbWipeout.d.ts.map +1 -0
  195. package/lib/entity/AcDbWipeout.js +40 -0
  196. package/lib/entity/AcDbWipeout.js.map +1 -0
  197. package/lib/entity/AcDbXline.d.ts +42 -0
  198. package/lib/entity/AcDbXline.d.ts.map +1 -0
  199. package/lib/entity/AcDbXline.js +102 -0
  200. package/lib/entity/AcDbXline.js.map +1 -0
  201. package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts +46 -0
  202. package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts.map +1 -0
  203. package/lib/entity/dimension/AcDb3PointAngularDimension.js +111 -0
  204. package/lib/entity/dimension/AcDb3PointAngularDimension.js.map +1 -0
  205. package/lib/entity/dimension/AcDbAlignedDimension.d.ts +77 -0
  206. package/lib/entity/dimension/AcDbAlignedDimension.d.ts.map +1 -0
  207. package/lib/entity/dimension/AcDbAlignedDimension.js +203 -0
  208. package/lib/entity/dimension/AcDbAlignedDimension.js.map +1 -0
  209. package/lib/entity/dimension/AcDbArcDimension.d.ts +46 -0
  210. package/lib/entity/dimension/AcDbArcDimension.d.ts.map +1 -0
  211. package/lib/entity/dimension/AcDbArcDimension.js +111 -0
  212. package/lib/entity/dimension/AcDbArcDimension.js.map +1 -0
  213. package/lib/entity/dimension/AcDbDiametricDimension.d.ts +69 -0
  214. package/lib/entity/dimension/AcDbDiametricDimension.d.ts.map +1 -0
  215. package/lib/entity/dimension/AcDbDiametricDimension.js +199 -0
  216. package/lib/entity/dimension/AcDbDiametricDimension.js.map +1 -0
  217. package/lib/entity/dimension/AcDbDimension.d.ts +161 -0
  218. package/lib/entity/dimension/AcDbDimension.d.ts.map +1 -0
  219. package/lib/entity/dimension/AcDbDimension.js +375 -0
  220. package/lib/entity/dimension/AcDbDimension.js.map +1 -0
  221. package/lib/entity/dimension/AcDbOrdinateDimension.d.ts +44 -0
  222. package/lib/entity/dimension/AcDbOrdinateDimension.d.ts.map +1 -0
  223. package/lib/entity/dimension/AcDbOrdinateDimension.js +99 -0
  224. package/lib/entity/dimension/AcDbOrdinateDimension.js.map +1 -0
  225. package/lib/entity/dimension/AcDbRadialDimension.d.ts +69 -0
  226. package/lib/entity/dimension/AcDbRadialDimension.d.ts.map +1 -0
  227. package/lib/entity/dimension/AcDbRadialDimension.js +148 -0
  228. package/lib/entity/dimension/AcDbRadialDimension.js.map +1 -0
  229. package/lib/entity/dimension/index.d.ts +8 -0
  230. package/lib/entity/dimension/index.d.ts.map +1 -0
  231. package/lib/entity/dimension/index.js +8 -0
  232. package/lib/entity/dimension/index.js.map +1 -0
  233. package/lib/entity/index.d.ts +23 -0
  234. package/lib/entity/index.d.ts.map +1 -0
  235. package/lib/entity/index.js +23 -0
  236. package/lib/entity/index.js.map +1 -0
  237. package/lib/index.d.ts +10 -0
  238. package/lib/index.d.ts.map +1 -0
  239. package/lib/index.js +10 -0
  240. package/lib/index.js.map +1 -0
  241. package/lib/misc/AcDbAngleUnits.d.ts +8 -0
  242. package/lib/misc/AcDbAngleUnits.d.ts.map +1 -0
  243. package/lib/misc/AcDbAngleUnits.js +9 -0
  244. package/lib/misc/AcDbAngleUnits.js.map +1 -0
  245. package/lib/misc/AcDbConstants.d.ts +4 -0
  246. package/lib/misc/AcDbConstants.d.ts.map +1 -0
  247. package/lib/misc/AcDbConstants.js +4 -0
  248. package/lib/misc/AcDbConstants.js.map +1 -0
  249. package/lib/misc/AcDbDimArrowType.d.ts +86 -0
  250. package/lib/misc/AcDbDimArrowType.d.ts.map +1 -0
  251. package/lib/misc/AcDbDimArrowType.js +87 -0
  252. package/lib/misc/AcDbDimArrowType.js.map +1 -0
  253. package/lib/misc/AcDbObjectIterator.d.ts +16 -0
  254. package/lib/misc/AcDbObjectIterator.d.ts.map +1 -0
  255. package/lib/misc/AcDbObjectIterator.js +28 -0
  256. package/lib/misc/AcDbObjectIterator.js.map +1 -0
  257. package/lib/misc/AcDbOsnapMode.d.ts +43 -0
  258. package/lib/misc/AcDbOsnapMode.d.ts.map +1 -0
  259. package/lib/misc/AcDbOsnapMode.js +44 -0
  260. package/lib/misc/AcDbOsnapMode.js.map +1 -0
  261. package/lib/misc/AcDbRenderingCache.d.ts +61 -0
  262. package/lib/misc/AcDbRenderingCache.d.ts.map +1 -0
  263. package/lib/misc/AcDbRenderingCache.js +154 -0
  264. package/lib/misc/AcDbRenderingCache.js.map +1 -0
  265. package/lib/misc/AcDbUnitsValue.d.ts +51 -0
  266. package/lib/misc/AcDbUnitsValue.d.ts.map +1 -0
  267. package/lib/misc/AcDbUnitsValue.js +71 -0
  268. package/lib/misc/AcDbUnitsValue.js.map +1 -0
  269. package/lib/misc/index.d.ts +8 -0
  270. package/lib/misc/index.d.ts.map +1 -0
  271. package/lib/misc/index.js +8 -0
  272. package/lib/misc/index.js.map +1 -0
  273. package/lib/object/AcDbDictionary.d.ts +80 -0
  274. package/lib/object/AcDbDictionary.d.ts.map +1 -0
  275. package/lib/object/AcDbDictionary.js +144 -0
  276. package/lib/object/AcDbDictionary.js.map +1 -0
  277. package/lib/object/AcDbRasterImageDef.d.ts +25 -0
  278. package/lib/object/AcDbRasterImageDef.d.ts.map +1 -0
  279. package/lib/object/AcDbRasterImageDef.js +54 -0
  280. package/lib/object/AcDbRasterImageDef.js.map +1 -0
  281. package/lib/object/index.d.ts +4 -0
  282. package/lib/object/index.d.ts.map +1 -0
  283. package/lib/object/index.js +4 -0
  284. package/lib/object/index.js.map +1 -0
  285. package/lib/object/layout/AcDbLayout.d.ts +51 -0
  286. package/lib/object/layout/AcDbLayout.d.ts.map +1 -0
  287. package/lib/object/layout/AcDbLayout.js +120 -0
  288. package/lib/object/layout/AcDbLayout.js.map +1 -0
  289. package/lib/object/layout/AcDbLayoutDictionary.d.ts +19 -0
  290. package/lib/object/layout/AcDbLayoutDictionary.d.ts.map +1 -0
  291. package/lib/object/layout/AcDbLayoutDictionary.js +94 -0
  292. package/lib/object/layout/AcDbLayoutDictionary.js.map +1 -0
  293. package/lib/object/layout/AcDbLayoutManager.d.ts +101 -0
  294. package/lib/object/layout/AcDbLayoutManager.d.ts.map +1 -0
  295. package/lib/object/layout/AcDbLayoutManager.js +154 -0
  296. package/lib/object/layout/AcDbLayoutManager.js.map +1 -0
  297. package/lib/object/layout/index.d.ts +4 -0
  298. package/lib/object/layout/index.d.ts.map +1 -0
  299. package/lib/object/layout/index.js +4 -0
  300. package/lib/object/layout/index.js.map +1 -0
  301. package/package.json +46 -0
@@ -0,0 +1,255 @@
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
+ var __assign = (this && this.__assign) || function () {
17
+ __assign = Object.assign || function(t) {
18
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
19
+ s = arguments[i];
20
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
+ t[p] = s[p];
22
+ }
23
+ return t;
24
+ };
25
+ return __assign.apply(this, arguments);
26
+ };
27
+ import { AcGeBox3d, AcGePoint3d } from '@mlightcad/geometry-engine';
28
+ import { AcGiMTextAttachmentPoint, AcGiMTextFlowDirection } from '@mlightcad/graphic-interface';
29
+ import { AcDbEntity } from './AcDbEntity';
30
+ /**
31
+ * The horizontal mode of the text
32
+ */
33
+ export var AcDbTextHorizontalMode;
34
+ (function (AcDbTextHorizontalMode) {
35
+ AcDbTextHorizontalMode[AcDbTextHorizontalMode["LEFT"] = 0] = "LEFT";
36
+ AcDbTextHorizontalMode[AcDbTextHorizontalMode["CENTER"] = 1] = "CENTER";
37
+ AcDbTextHorizontalMode[AcDbTextHorizontalMode["RIGHT"] = 2] = "RIGHT";
38
+ AcDbTextHorizontalMode[AcDbTextHorizontalMode["ALIGNED"] = 3] = "ALIGNED";
39
+ AcDbTextHorizontalMode[AcDbTextHorizontalMode["MIDDLE"] = 4] = "MIDDLE";
40
+ AcDbTextHorizontalMode[AcDbTextHorizontalMode["FIT"] = 5] = "FIT";
41
+ })(AcDbTextHorizontalMode || (AcDbTextHorizontalMode = {}));
42
+ /**
43
+ * The vertical mode of the text
44
+ */
45
+ export var AcDbTextVerticalMode;
46
+ (function (AcDbTextVerticalMode) {
47
+ AcDbTextVerticalMode[AcDbTextVerticalMode["BASELINE"] = 0] = "BASELINE";
48
+ AcDbTextVerticalMode[AcDbTextVerticalMode["BOTTOM"] = 1] = "BOTTOM";
49
+ AcDbTextVerticalMode[AcDbTextVerticalMode["MIDDLE"] = 2] = "MIDDLE";
50
+ AcDbTextVerticalMode[AcDbTextVerticalMode["TOP"] = 3] = "TOP";
51
+ })(AcDbTextVerticalMode || (AcDbTextVerticalMode = {}));
52
+ /**
53
+ * The class represents the text entity in AutoCAD.
54
+ */
55
+ var AcDbText = /** @class */ (function (_super) {
56
+ __extends(AcDbText, _super);
57
+ function AcDbText() {
58
+ var _this = _super.call(this) || this;
59
+ _this._textString = '';
60
+ _this._height = 0;
61
+ _this._thickness = 1;
62
+ _this._position = new AcGePoint3d();
63
+ _this._rotation = 0;
64
+ _this._oblique = 0;
65
+ _this._horizontalMode = AcDbTextHorizontalMode.LEFT;
66
+ _this._verticalModel = AcDbTextVerticalMode.MIDDLE;
67
+ _this._styleName = '';
68
+ _this._widthFactor = 1;
69
+ return _this;
70
+ }
71
+ Object.defineProperty(AcDbText.prototype, "textString", {
72
+ /**
73
+ * The text string used by this entity
74
+ */
75
+ get: function () {
76
+ return this._textString;
77
+ },
78
+ set: function (value) {
79
+ this._textString = value;
80
+ },
81
+ enumerable: false,
82
+ configurable: true
83
+ });
84
+ Object.defineProperty(AcDbText.prototype, "thickness", {
85
+ /**
86
+ * The thickness for the text. The thickness is the text's dimension along its normal vector
87
+ * direction (sometimes called the extrusion direction).
88
+ */
89
+ get: function () {
90
+ return this._thickness;
91
+ },
92
+ set: function (value) {
93
+ this._thickness = value;
94
+ },
95
+ enumerable: false,
96
+ configurable: true
97
+ });
98
+ Object.defineProperty(AcDbText.prototype, "height", {
99
+ /**
100
+ * The height of the text. The height value is used as a scale factor for both height and width
101
+ * of the text.
102
+ */
103
+ get: function () {
104
+ return this._height;
105
+ },
106
+ set: function (value) {
107
+ this._height = value;
108
+ },
109
+ enumerable: false,
110
+ configurable: true
111
+ });
112
+ Object.defineProperty(AcDbText.prototype, "position", {
113
+ /**
114
+ * The insertion point of the text in WCS coordinates.
115
+ */
116
+ get: function () {
117
+ return this._position;
118
+ },
119
+ set: function (value) {
120
+ this._position.copy(value);
121
+ },
122
+ enumerable: false,
123
+ configurable: true
124
+ });
125
+ Object.defineProperty(AcDbText.prototype, "rotation", {
126
+ /**
127
+ * The rotation angle of the text. The rotation angle is relative to the X axis of the text's OCS,
128
+ * with positive angles going counterclockwise when looking down the Z axis toward the origin. The
129
+ * OCS X axis is determined by using the text's normal vector, the WCS Z axis, and the arbitrary
130
+ * axis algorithm.
131
+ */
132
+ get: function () {
133
+ return this._rotation;
134
+ },
135
+ set: function (value) {
136
+ this._rotation = value;
137
+ },
138
+ enumerable: false,
139
+ configurable: true
140
+ });
141
+ Object.defineProperty(AcDbText.prototype, "oblique", {
142
+ /**
143
+ * The oblique angle (in radians) of the text. The obliquing angle is the angle from the text's
144
+ * vertical; that is, the top of the text "slants" relative to the bottom, the same as the slope
145
+ * in this italic text. Positive angles slant characters forward at their tops. Negative angles
146
+ * have 2pi added to them to convert them to their positive equivalent.
147
+ */
148
+ get: function () {
149
+ return this._oblique;
150
+ },
151
+ set: function (value) {
152
+ this._oblique = value;
153
+ },
154
+ enumerable: false,
155
+ configurable: true
156
+ });
157
+ Object.defineProperty(AcDbText.prototype, "horizontalMode", {
158
+ /**
159
+ * The horizontal mode of the text
160
+ */
161
+ get: function () {
162
+ return this._horizontalMode;
163
+ },
164
+ set: function (value) {
165
+ this._horizontalMode = value;
166
+ },
167
+ enumerable: false,
168
+ configurable: true
169
+ });
170
+ Object.defineProperty(AcDbText.prototype, "verticalMode", {
171
+ /**
172
+ * The vertical mode of the text
173
+ */
174
+ get: function () {
175
+ return this._verticalModel;
176
+ },
177
+ set: function (value) {
178
+ this._verticalModel = value;
179
+ },
180
+ enumerable: false,
181
+ configurable: true
182
+ });
183
+ Object.defineProperty(AcDbText.prototype, "styleName", {
184
+ /**
185
+ * The style name stored in text style table record and used by this text entity
186
+ */
187
+ get: function () {
188
+ return this._styleName;
189
+ },
190
+ set: function (value) {
191
+ this._styleName = value;
192
+ },
193
+ enumerable: false,
194
+ configurable: true
195
+ });
196
+ Object.defineProperty(AcDbText.prototype, "widthFactor", {
197
+ /**
198
+ * The width factor (also referred to as the relative X-scale factor) for the text. The widthFactor
199
+ * is applied to the text's width to allow the width to be adjusted independently of the height.
200
+ * For example, if the widthFactor value is 0.8, then the text is drawn with a width that is 80% of
201
+ * its normal "unadjusted" width.
202
+ */
203
+ get: function () {
204
+ return this._widthFactor;
205
+ },
206
+ set: function (value) {
207
+ this._widthFactor = value;
208
+ },
209
+ enumerable: false,
210
+ configurable: true
211
+ });
212
+ Object.defineProperty(AcDbText.prototype, "geometricExtents", {
213
+ /**
214
+ * @inheritdoc
215
+ */
216
+ get: function () {
217
+ // TODO: Implement it correctly
218
+ return new AcGeBox3d();
219
+ },
220
+ enumerable: false,
221
+ configurable: true
222
+ });
223
+ AcDbText.prototype.getTextStyle = function () {
224
+ var textStyleTable = this.database.tables.textStyleTable;
225
+ var style = textStyleTable.getAt(this.styleName);
226
+ if (!style) {
227
+ style = (textStyleTable.getAt('STANDARD') ||
228
+ textStyleTable.getAt('Standard'));
229
+ }
230
+ return style.textStyle;
231
+ };
232
+ /**
233
+ * @inheritdoc
234
+ */
235
+ AcDbText.prototype.draw = function (renderer) {
236
+ var mtextData = {
237
+ text: this.textString,
238
+ height: this.height,
239
+ width: Infinity,
240
+ widthFactor: this.widthFactor,
241
+ position: this.position,
242
+ // Please use 'rotation' and do not set value of 'directionVector' because it will overrides
243
+ // rotation value.
244
+ rotation: this.rotation,
245
+ // MText draw text from top to bottom.
246
+ drawingDirection: AcGiMTextFlowDirection.BOTTOM_TO_TOP,
247
+ attachmentPoint: AcGiMTextAttachmentPoint.BottomLeft
248
+ };
249
+ var textStyle = __assign(__assign({}, this.getTextStyle()), { color: this.rgbColor });
250
+ return renderer.mtext(mtextData, textStyle);
251
+ };
252
+ return AcDbText;
253
+ }(AcDbEntity));
254
+ export { AcDbText };
255
+ //# sourceMappingURL=AcDbText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcDbText.js","sourceRoot":"","sources":["../../src/entity/AcDbText.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,EAEL,wBAAwB,EAExB,sBAAsB,EAEvB,MAAM,8BAA8B,CAAA;AAErC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;GAEG;AACH,MAAM,CAAN,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,mEAAQ,CAAA;IACR,uEAAU,CAAA;IACV,qEAAS,CAAA;IACT,yEAAW,CAAA;IACX,uEAAU,CAAA;IACV,iEAAO,CAAA;AACT,CAAC,EAPW,sBAAsB,KAAtB,sBAAsB,QAOjC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,uEAAY,CAAA;IACZ,mEAAU,CAAA;IACV,mEAAU,CAAA;IACV,6DAAO,CAAA;AACT,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAED;;GAEG;AACH;IAA8B,4BAAU;IAYtC;QACE,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,WAAW,GAAG,EAAE,CAAA;QACrB,KAAI,CAAC,OAAO,GAAG,CAAC,CAAA;QAChB,KAAI,CAAC,UAAU,GAAG,CAAC,CAAA;QACnB,KAAI,CAAC,SAAS,GAAG,IAAI,WAAW,EAAE,CAAA;QAClC,KAAI,CAAC,SAAS,GAAG,CAAC,CAAA;QAClB,KAAI,CAAC,QAAQ,GAAG,CAAC,CAAA;QACjB,KAAI,CAAC,eAAe,GAAG,sBAAsB,CAAC,IAAI,CAAA;QAClD,KAAI,CAAC,cAAc,GAAG,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;YACnB,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,4FAA4F;YAC5F,kBAAkB;YAClB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,sCAAsC;YACtC,gBAAgB,EAAE,sBAAsB,CAAC,aAAa;YACtD,eAAe,EAAE,wBAAwB,CAAC,UAAU;SACrD,CAAA;QACD,IAAM,SAAS,yBAAQ,IAAI,CAAC,YAAY,EAAE,KAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,GAAE,CAAA;QAClE,OAAO,QAAQ,CAAC,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;IAC7C,CAAC;IACH,eAAC;AAAD,CAAC,AA/KD,CAA8B,UAAU,GA+KvC"}
@@ -0,0 +1,64 @@
1
+ import { AcGeBox3d, AcGePoint3d, AcGePointLike } from '@mlightcad/geometry-engine';
2
+ import { AcGiRenderer } from '@mlightcad/graphic-interface';
3
+ import { AcDbCurve } from './AcDbCurve';
4
+ /**
5
+ * The class represents the trace entity in AutoCAD, which represents a filled four-sided polygon.
6
+ * It is typically used to create trace-like shapes. It is one of the simpler types of entities
7
+ * within the AutoCAD database and can be visualized as a "filled polyline" with four vertices,
8
+ * where each edge connects two consecutive points.
9
+ *
10
+ * This entity was more commonly used in earlier versions of AutoCAD, especially before the
11
+ * introduction of more advanced entities like solid and hatches. Today, it's not as commonly used
12
+ * since solid provides similar capabilities with more flexibility.
13
+ */
14
+ export declare class AcDbTrace extends AcDbCurve {
15
+ private _elevation;
16
+ private _vertices;
17
+ private _thickness;
18
+ /**
19
+ * Create one empty trace entity
20
+ */
21
+ constructor();
22
+ /**
23
+ * The distance of the trace's plane from the WCS origin.
24
+ */
25
+ get elevation(): number;
26
+ set elevation(value: number);
27
+ /**
28
+ * @inheritdoc
29
+ */
30
+ get closed(): boolean;
31
+ /**
32
+ * The thickness for the text. The thickness is the text's dimension along its normal vector
33
+ * direction (sometimes called the extrusion direction).
34
+ */
35
+ get thickness(): number;
36
+ set thickness(value: number);
37
+ /**
38
+ * Return the point in the trace whose index is equal to the specified `index` value. `index` can have
39
+ * a value of 0, 1, 2, or 3, depending on which point is desired (that is, 0 for the first point, 1 for
40
+ * the second point, etc.). The returned point is in WCS coordinates.
41
+ * @param index Input index (0 based) of the vertex.
42
+ * @returns Return the point in the trace whose index is equal to the specified `index` value.
43
+ */
44
+ getPointAt(index: number): AcGePoint3d;
45
+ /**
46
+ * Set sets the `index`'th point in the trace to the value `point`. `index` must be 0, 1, 2, or 3.
47
+ * `point` must be in WCS coordinates.
48
+ * @param index Input index (0-3) of the point to set in the trace
49
+ */
50
+ setPointAt(index: number, point: AcGePointLike): AcGePoint3d | undefined;
51
+ /**
52
+ * @inheritdoc
53
+ */
54
+ get geometricExtents(): AcGeBox3d;
55
+ /**
56
+ * @inheritdoc
57
+ */
58
+ subGetGripPoints(): AcGePoint3d[];
59
+ /**
60
+ * @inheritdoc
61
+ */
62
+ draw(renderer: AcGiRenderer): import("@mlightcad/graphic-interface").AcGiEntity;
63
+ }
64
+ //# sourceMappingURL=AcDbTrace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcDbTrace.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbTrace.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EACT,WAAW,EACX,aAAa,EAEd,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC;;;;;;;;;GASG;AACH,qBAAa,SAAU,SAAQ,SAAS;IACtC,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,SAAS,CAAsD;IACvE,OAAO,CAAC,UAAU,CAAQ;IAE1B;;OAEG;;IAaH;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IACD,IAAI,SAAS,CAAC,KAAK,EAAE,MAAM,EAE1B;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED;;;OAGG;IACH,IAAI,SAAS,IAGQ,MAAM,CAD1B;IACD,IAAI,SAAS,CAAC,KAAK,EAAE,MAAM,EAE1B;IAED;;;;;;OAMG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW;IAMtC;;;;OAIG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa;IAM9C;;OAEG;IACH,IAAI,gBAAgB,IAAI,SAAS,CAEhC;IAED;;OAEG;IACH,gBAAgB;IAQhB;;OAEG;IACH,IAAI,CAAC,QAAQ,EAAE,YAAY;CAW5B"}
@@ -0,0 +1,145 @@
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 { AcGeArea2d, AcGeBox3d, AcGePoint3d, AcGePolyline2d } from '@mlightcad/geometry-engine';
17
+ import { AcDbCurve } from './AcDbCurve';
18
+ /**
19
+ * The class represents the trace entity in AutoCAD, which represents a filled four-sided polygon.
20
+ * It is typically used to create trace-like shapes. It is one of the simpler types of entities
21
+ * within the AutoCAD database and can be visualized as a "filled polyline" with four vertices,
22
+ * where each edge connects two consecutive points.
23
+ *
24
+ * This entity was more commonly used in earlier versions of AutoCAD, especially before the
25
+ * introduction of more advanced entities like solid and hatches. Today, it's not as commonly used
26
+ * since solid provides similar capabilities with more flexibility.
27
+ */
28
+ var AcDbTrace = /** @class */ (function (_super) {
29
+ __extends(AcDbTrace, _super);
30
+ /**
31
+ * Create one empty trace entity
32
+ */
33
+ function AcDbTrace() {
34
+ var _this = _super.call(this) || this;
35
+ _this._elevation = 0;
36
+ _this._thickness = 1;
37
+ _this._vertices = [
38
+ new AcGePoint3d(),
39
+ new AcGePoint3d(),
40
+ new AcGePoint3d(),
41
+ new AcGePoint3d()
42
+ ];
43
+ return _this;
44
+ }
45
+ Object.defineProperty(AcDbTrace.prototype, "elevation", {
46
+ /**
47
+ * The distance of the trace's plane from the WCS origin.
48
+ */
49
+ get: function () {
50
+ return this._elevation;
51
+ },
52
+ set: function (value) {
53
+ this._elevation = value;
54
+ },
55
+ enumerable: false,
56
+ configurable: true
57
+ });
58
+ Object.defineProperty(AcDbTrace.prototype, "closed", {
59
+ /**
60
+ * @inheritdoc
61
+ */
62
+ get: function () {
63
+ return true;
64
+ },
65
+ enumerable: false,
66
+ configurable: true
67
+ });
68
+ Object.defineProperty(AcDbTrace.prototype, "thickness", {
69
+ /**
70
+ * The thickness for the text. The thickness is the text's dimension along its normal vector
71
+ * direction (sometimes called the extrusion direction).
72
+ */
73
+ get: function () {
74
+ return this._thickness;
75
+ },
76
+ set: function (value) {
77
+ this._thickness = value;
78
+ },
79
+ enumerable: false,
80
+ configurable: true
81
+ });
82
+ /**
83
+ * Return the point in the trace whose index is equal to the specified `index` value. `index` can have
84
+ * a value of 0, 1, 2, or 3, depending on which point is desired (that is, 0 for the first point, 1 for
85
+ * the second point, etc.). The returned point is in WCS coordinates.
86
+ * @param index Input index (0 based) of the vertex.
87
+ * @returns Return the point in the trace whose index is equal to the specified `index` value.
88
+ */
89
+ AcDbTrace.prototype.getPointAt = function (index) {
90
+ if (index < 0)
91
+ return this._vertices[0];
92
+ if (index > 3)
93
+ return this._vertices[3];
94
+ return this._vertices[index];
95
+ };
96
+ /**
97
+ * Set sets the `index`'th point in the trace to the value `point`. `index` must be 0, 1, 2, or 3.
98
+ * `point` must be in WCS coordinates.
99
+ * @param index Input index (0-3) of the point to set in the trace
100
+ */
101
+ AcDbTrace.prototype.setPointAt = function (index, point) {
102
+ if (index < 0)
103
+ this._vertices[0].copy(point);
104
+ if (index > 3)
105
+ return this._vertices[3].copy(point);
106
+ this._vertices[index].copy(point);
107
+ };
108
+ Object.defineProperty(AcDbTrace.prototype, "geometricExtents", {
109
+ /**
110
+ * @inheritdoc
111
+ */
112
+ get: function () {
113
+ return new AcGeBox3d().setFromPoints(this._vertices);
114
+ },
115
+ enumerable: false,
116
+ configurable: true
117
+ });
118
+ /**
119
+ * @inheritdoc
120
+ */
121
+ AcDbTrace.prototype.subGetGripPoints = function () {
122
+ var gripPoints = new Array();
123
+ for (var index = 0; index < 4; ++index) {
124
+ gripPoints.push(this.getPointAt(index));
125
+ }
126
+ return gripPoints;
127
+ };
128
+ /**
129
+ * @inheritdoc
130
+ */
131
+ AcDbTrace.prototype.draw = function (renderer) {
132
+ var polyline = new AcGePolyline2d(this._vertices, true);
133
+ var area = new AcGeArea2d();
134
+ area.add(polyline);
135
+ return renderer.area(area, {
136
+ color: this.rgbColor,
137
+ solidFill: true,
138
+ patternAngle: 0,
139
+ patternLines: []
140
+ });
141
+ };
142
+ return AcDbTrace;
143
+ }(AcDbCurve));
144
+ export { AcDbTrace };
145
+ //# sourceMappingURL=AcDbTrace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcDbTrace.js","sourceRoot":"","sources":["../../src/entity/AcDbTrace.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EACL,UAAU,EACV,SAAS,EACT,WAAW,EAEX,cAAc,EACf,MAAM,4BAA4B,CAAA;AAGnC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC;;;;;;;;;GASG;AACH;IAA+B,6BAAS;IAKtC;;OAEG;IACH;QACE,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,UAAU,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AC,IAAI,CAAC,KAAK,CAAC,CAAA;IACnC,CAAC;IAKD,sBAAI,uCAAgB;QAHpB;;WAEG;aACH;YACE,OAAO,IAAI,SAAS,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QACtD,CAAC;;;OAAA;IAED;;OAEG;IACH,oCAAgB,GAAhB;QACE,IAAM,UAAU,GAAG,IAAI,KAAK,EAAe,CAAA;QAC3C,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC;YACvC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAA;QACzC,CAAC;QACD,OAAO,UAAU,CAAA;IACnB,CAAC;IAED;;OAEG;IACH,wBAAI,GAAJ,UAAK,QAAsB;QACzB,IAAM,QAAQ,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;QACzD,IAAM,IAAI,GAAG,IAAI,UAAU,EAAE,CAAA;QAC7B,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QAClB,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE;YACzB,KAAK,EAAE,IAAI,CAAC,QAAQ;YACpB,SAAS,EAAE,IAAI;YACf,YAAY,EAAE,CAAC;YACf,YAAY,EAAE,EAAE;SACjB,CAAC,CAAA;IACJ,CAAC;IACH,gBAAC;AAAD,CAAC,AAxGD,CAA+B,SAAS,GAwGvC"}
@@ -0,0 +1,58 @@
1
+ import { AcGeBox3d, AcGePoint3d } from '@mlightcad/geometry-engine';
2
+ import { AcGiEntity, AcGiRenderer, AcGiViewport } from '@mlightcad/graphic-interface';
3
+ import { AcDbEntity } from './AcDbEntity';
4
+ export declare class AcDbViewport extends AcDbEntity {
5
+ private _centerPoint;
6
+ private _height;
7
+ private _width;
8
+ private _viewCenter;
9
+ private _viewHeight;
10
+ private _number;
11
+ constructor();
12
+ /**
13
+ * The viewport ID number. This is the number that is reported by the AutoCAD CVPORT system variable
14
+ * when the viewport is the current viewport in the AutoCAD editor. If the viewport is inactive, -1
15
+ * is returned.
16
+ * This value is not saved with the drawing, and changes each time the drawing is opened.
17
+ */
18
+ get number(): number;
19
+ set number(value: number);
20
+ /**
21
+ * The center point of the viewport entity in WCS coordinates (within Paper Space).
22
+ */
23
+ get centerPoint(): AcGePoint3d;
24
+ set centerPoint(value: AcGePoint3d);
25
+ /**
26
+ * The height of the viewport entity's window in drawing units.
27
+ */
28
+ get height(): number;
29
+ set height(value: number);
30
+ /**
31
+ * The width of the viewport entity's window in drawing units. This is the width in Paper Space
32
+ * of the viewport itself, not the width of the Model Space view within the viewport.
33
+ */
34
+ get width(): number;
35
+ set width(value: number);
36
+ /**
37
+ * The view center (in display coordinate system coordinates) of the view in the viewport.
38
+ */
39
+ get viewCenter(): AcGePoint3d;
40
+ set viewCenter(value: AcGePoint3d);
41
+ /**
42
+ * The height (in display coordinate system coordinates) of the Model Space view within the viewport.
43
+ * Zooming the view out within the viewport increases this value and zooming in decreases this value.
44
+ */
45
+ get viewHeight(): number;
46
+ set viewHeight(value: number);
47
+ /**
48
+ * @inheritdoc
49
+ */
50
+ get geometricExtents(): AcGeBox3d;
51
+ /**
52
+ * @inheritdoc
53
+ */
54
+ draw(renderer: AcGiRenderer): AcGiEntity | undefined;
55
+ toGiViewport(): AcGiViewport;
56
+ private createViewportRect;
57
+ }
58
+ //# sourceMappingURL=AcDbViewport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcDbViewport.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbViewport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,EACL,UAAU,EACV,YAAY,EACZ,YAAY,EACb,MAAM,8BAA8B,CAAA;AAErC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,qBAAa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