mxcad 1.0.295 → 1.0.297

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
@@ -6638,6 +6638,22 @@ export declare class McDbBlockReference extends McDbEntity {
6638
6638
  * ```
6639
6639
  */
6640
6640
  clearSpatialFilterCache(): boolean;
6641
+ /**
6642
+ * 把块引用的属性拷到到另一个块引上,被拷贝的块引用必须在图形数据库中。
6643
+ * @returns
6644
+ * @example
6645
+ * ```ts
6646
+ * ```
6647
+ */
6648
+ copyAttribute(to: McDbBlockReference): boolean;
6649
+ /**
6650
+ * 删除块引用的所有属性
6651
+ * @returns
6652
+ * @example
6653
+ * ```ts
6654
+ * ```
6655
+ */
6656
+ eraseAllAttribute(): void;
6641
6657
  }
6642
6658
  /**
6643
6659
  * 表示一个 CAD 图块的剪切边界对象
@@ -9242,6 +9258,62 @@ export declare class McDbDimStyleTableRecord extends McDbObject {
9242
9258
  * ```
9243
9259
  */
9244
9260
  setDimVarObjectId(type: number, value: McObjectId): boolean;
9261
+ /**
9262
+ * 得到标注样式的Dimblk属性。
9263
+ * @example
9264
+ * ```ts
9265
+ * ```
9266
+ */
9267
+ getDimblk(): string;
9268
+ /**
9269
+ * 设置标注样式的Dimblk属性。
9270
+ * @example
9271
+ * ```ts
9272
+ * ```
9273
+ */
9274
+ setDimblk(value: string): boolean;
9275
+ /**
9276
+ * 得到标注样式的Dimblk1属性。
9277
+ * @example
9278
+ * ```ts
9279
+ * ```
9280
+ */
9281
+ getDimblk1(): string;
9282
+ /**
9283
+ * 设置标注样式的Dimblk1属性。
9284
+ * @example
9285
+ * ```ts
9286
+ * ```
9287
+ */
9288
+ setDimblk1(value: string): boolean;
9289
+ /**
9290
+ * 得到标注样式的Dimblk2属性。
9291
+ * @example
9292
+ * ```ts
9293
+ * ```
9294
+ */
9295
+ getDimblk2(): string;
9296
+ /**
9297
+ * 设置标注样式的Dimblk2属性。
9298
+ * @example
9299
+ * ```ts
9300
+ * ```
9301
+ */
9302
+ setDimblk2(value: string): boolean;
9303
+ /**
9304
+ * 得到标注样式的Dimldrblk属性。
9305
+ * @example
9306
+ * ```ts
9307
+ * ```
9308
+ */
9309
+ getDimldrblk(): string;
9310
+ /**
9311
+ * 设置标注样式的Dimblk属性。
9312
+ * @example
9313
+ * ```ts
9314
+ * ```
9315
+ */
9316
+ setDimldrblk(value: string): boolean;
9245
9317
  }
9246
9318
  /**
9247
9319
  * 表示一个文字样式表记录对象,实现了对文字的属性相关操作函数。
@@ -13801,24 +13873,71 @@ export interface MarksStyleText {
13801
13873
  type?: string;
13802
13874
  /** 倾斜角度 */
13803
13875
  tiltAngle?: number;
13876
+ /** 追踪*/
13804
13877
  tracking?: number;
13878
+ /** 宽度因子 */
13805
13879
  widthFactor?: number;
13880
+ /** 文本位置: 'superscript' - 上标, 'subscript' - 下标,undefined - 正常 */
13881
+ textPosition?: "superscript" | "subscript";
13806
13882
  }
13807
13883
  export type CustomText = MarksStyleText;
13808
13884
  export interface BaseElement {
13809
13885
  type: string;
13810
13886
  children: Array<IMxEditorElement | CustomText>;
13811
13887
  }
13812
- export interface paragraphElement extends BaseElement {
13888
+ export interface ParagraphElement extends BaseElement {
13813
13889
  type: "paragraph";
13890
+ alignment?: "left" | "center" | "right" | "justify" | "distribute";
13891
+ lineHeightRatio?: number;
13814
13892
  }
13815
- export type IMxEditorElement = BaseElement | paragraphElement;
13893
+ export type IMxEditorElement = BaseElement | ParagraphElement;
13816
13894
  export type IMxEditorNode = IMxEditorElement | CustomText;
13817
13895
  export interface IMxEditorPoint {
13818
13896
  path: number[];
13819
13897
  offset: number;
13820
13898
  }
13821
13899
  export type IMxEditorDescendant = IMxEditorNode | MarksStyleText;
13900
+ declare enum SequenceType {
13901
+ /** 中文字符序列 */
13902
+ Chinese = "chinese",
13903
+ /** 连续字符序列(如英文单词、数字等) */
13904
+ Continuous = "continuous",
13905
+ /** 其他可断行字符(空格、标点等) */
13906
+ Breakable = "breakable",
13907
+ /** 行内元素 */
13908
+ Element = "element",
13909
+ /** 自定义文本节点*/
13910
+ TextNode = "textNode"
13911
+ }
13912
+ /**
13913
+ * 序列中的片段信息
13914
+ */
13915
+ export interface SequenceFragment {
13916
+ /** 文本节点 */
13917
+ node: MarksStyleText | IMxEditorElement;
13918
+ /** 节点索引 */
13919
+ nodeIndex: number;
13920
+ /** 在节点中的起始位置 */
13921
+ startOffset: number;
13922
+ /** 在节点中的结束位置 */
13923
+ endOffset: number;
13924
+ /** 片段文本内容 */
13925
+ text: string;
13926
+ }
13927
+ /**
13928
+ * 表示文本中的一个序列
13929
+ * 一个序列可能跨越多个文本节点
13930
+ */
13931
+ export interface TextSequence {
13932
+ /** 序列类型 */
13933
+ type: SequenceType;
13934
+ /** 序列包含的文本片段 */
13935
+ fragments: SequenceFragment[];
13936
+ /** 序列的完整文本 */
13937
+ text: string;
13938
+ /** 是否超出范围自动换行 */
13939
+ isAutoBreak?: boolean;
13940
+ }
13822
13941
  /**
13823
13942
  * 文本片段信息
13824
13943
  */
@@ -13835,6 +13954,12 @@ export interface TextFragment {
13835
13954
  width: number;
13836
13955
  height: number;
13837
13956
  index: number;
13957
+ /** 是否需要字符级别间距 */
13958
+ hasCharLevelSpacing?: boolean;
13959
+ /** 引用的序列,用于获取字符宽度 */
13960
+ sequence?: TextSequence;
13961
+ /** 字符间的额外间距,分布式布局结果 */
13962
+ extraCharSpacing?: number;
13838
13963
  }
13839
13964
  declare enum BreakType {
13840
13965
  None = "none",
@@ -13853,6 +13978,22 @@ export interface LineInfo {
13853
13978
  horizontalOffset?: number;
13854
13979
  bottomSpacing?: number;
13855
13980
  }
13981
+ declare class MultilineTextConverter {
13982
+ /**
13983
+ * 将McDbMText实体转换为McDbCustomEditorEntity
13984
+ * @param mtext CAD多行文本实体
13985
+ * @param options 转换选项
13986
+ * @returns 自定义编辑器实体
13987
+ */
13988
+ static fromMText(mtext: McDbMText): MxCADMText;
13989
+ /**
13990
+ * 将McDbCustomEditorEntity转换为McDbMText
13991
+ * @param customEntity 自定义编辑器实体
13992
+ * @param options 转换选项
13993
+ * @returns CAD多行文本实体
13994
+ */
13995
+ static toMText(customEntity: MxCADMText, mtext?: McDbMText): (McDbEntity | McDbCustomEntity)[];
13996
+ }
13856
13997
  export interface CalculateData {
13857
13998
  width: number;
13858
13999
  height: number;
@@ -14024,22 +14165,6 @@ declare class MxCADMTextImp extends PubSub<{
14024
14165
  /** 设置实体类型 */
14025
14166
  setEntityType(type: "custom" | "mtext"): void;
14026
14167
  }
14027
- declare class MultilineTextConverter {
14028
- /**
14029
- * 将McDbMText实体转换为McDbCustomEditorEntity
14030
- * @param mtext CAD多行文本实体
14031
- * @param options 转换选项
14032
- * @returns 自定义编辑器实体
14033
- */
14034
- static fromMText(mtext: McDbMText): MxCADMText;
14035
- /**
14036
- * 将McDbCustomEditorEntity转换为McDbMText
14037
- * @param customEntity 自定义编辑器实体
14038
- * @param options 转换选项
14039
- * @returns CAD多行文本实体
14040
- */
14041
- static toMText(customEntity: MxCADMText, mtext?: McDbMText): (McDbEntity | McDbCustomEntity)[];
14042
- }
14043
14168
  declare function convertCadPointToSlatePoint(this: MxCADMText, point: McGePoint3d): {
14044
14169
  path: number[];
14045
14170
  offset: number;