mxcad 1.0.190 → 1.0.191

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/dist/mxcad.d.ts CHANGED
@@ -634,6 +634,15 @@ export declare class MdGeDoubleArray {
634
634
  */
635
635
  forEach(call: (val: number, index: number) => void): void;
636
636
  }
637
+ declare class MxCoordConvertType {
638
+ doc2cad(pt: McGePoint3d): McGePoint3d;
639
+ cad2doc(pt: McGePoint3d): McGePoint3d;
640
+ doc2cad1(pt: THREE.Vector3): McGePoint3d;
641
+ doc2cad2(x: number, y: number, z: number): McGePoint3d;
642
+ cad2doc1(pt: McGePoint3d): THREE.Vector3;
643
+ cad2doc2(x: number, y: number, z: number): THREE.Vector3;
644
+ }
645
+ export declare let MxCoordConvert: MxCoordConvertType;
637
646
  export declare function getFilterImp(filter?: MxCADResbuf | null): any;
638
647
  /*** AutoLISP 中 resbuf 结构中可能的数据类型 */
639
648
  export declare enum MxCADResbufDataType {
@@ -3126,6 +3135,19 @@ export declare class McObject {
3126
3135
  * @param imp 对象实现
3127
3136
  */
3128
3137
  constructor(imp?: any);
3138
+ /**
3139
+ * 返回与MxCAD对象绑定的MxDraw对象。
3140
+ */
3141
+ getMxDrawObject(): MxDrawObject;
3142
+ /**
3143
+ * 返回与MxCAD对象绑定的MxDraw对象。
3144
+ */
3145
+ get mxdraw(): MxDrawObject;
3146
+ /**
3147
+ * 获取对象实现
3148
+ * @returns 对象实现
3149
+ */
3150
+ getImp(): any;
3129
3151
  /**
3130
3152
  * 初始对象
3131
3153
  * @param imp 对象实现,默认该函数会被系统自动调用。
@@ -3161,19 +3183,6 @@ export declare class McObject {
3161
3183
  * @param mxObject 初始化{@link https://mxcadx.gitee.io/mxdraw_docs | mxdraw} 创建的绘图控件
3162
3184
  */
3163
3185
  initMxObject(mxObject: any): void;
3164
- /**
3165
- * 返回与MxCAD对象绑定的MxDraw对象。
3166
- */
3167
- getMxDrawObject(): MxDrawObject;
3168
- /**
3169
- * 返回与MxCAD对象绑定的MxDraw对象。
3170
- */
3171
- get mxdraw(): MxDrawObject;
3172
- /**
3173
- * 获取对象实现
3174
- * @returns 对象实现
3175
- */
3176
- getImp(): any;
3177
3186
  /**
3178
3187
  * 重绘图上所有对象,在调用ZoomAll,ZoomW后,因为是异步执行,可能需要延迟调用Regen才会启作用。
3179
3188
  */
@@ -3586,6 +3595,26 @@ export declare class McObject {
3586
3595
  * @param dRadius 半径
3587
3596
  */
3588
3597
  drawCircle(dCenterX: number, dCenterY: number, dRadius: number): McObjectId;
3598
+ /**
3599
+ *加载一个外部图片到当前上下文,方便后面使用.
3600
+ */
3601
+ loadImage(imageUrl: string, call: (image: any) => void): void;
3602
+ /**
3603
+ * 绘制一个图片
3604
+ * @param dPosX 图片 X 坐标
3605
+ * @param dPosY 图片 Y 坐标
3606
+ * @param dWidth 图片宽度
3607
+ * @param dHeight 图片高度
3608
+ * @param dAng 图片角度
3609
+ * @param imageUrl 图片路径
3610
+ */
3611
+ drawImage(dPosX: number, dPosY: number, dWidth: number, dHeight: number, dAng: number, imageUrl: string): McObjectId;
3612
+ /**
3613
+ * 添加一个图片定义到cad数据库中 。
3614
+ * @param imageUrl 图片路径
3615
+ * @param sName 图片定义名称
3616
+ */
3617
+ addImageDefine(imageUrl: string, sName?: string): McObjectId;
3589
3618
  /**
3590
3619
  * 绘制椭圆
3591
3620
  * @param dCenterX 椭圆中心 X 坐标
@@ -3812,18 +3841,6 @@ export declare class McObject {
3812
3841
  */
3813
3842
  getMxCpp(): any;
3814
3843
  /**
3815
- * 当前绘图坐标到CAD图纸坐标.
3816
- */
3817
- doc2cad(pt: McGePoint3d): McGePoint3d;
3818
- /**
3819
- * CAD图纸坐标到当前绘图坐标
3820
- */
3821
- cad2doc(pt: McGePoint3d): McGePoint3d;
3822
- doc2cad1(pt: THREE.Vector3): McGePoint3d;
3823
- doc2cad2(x: number, y: number, z: number): McGePoint3d;
3824
- cad2doc1(pt: McGePoint3d): THREE.Vector3;
3825
- cad2doc2(x: number, y: number, z: number): THREE.Vector3;
3826
- /**
3827
3844
  * 返回当前视区的显示范围,cad坐标。
3828
3845
  */
3829
3846
  getViewCADCoord(): {