interface TextObjectUtilsType {
    canMergeText: (
        graphicObjectUtils: GraphicObjectUtilsType,
    ) => Promise<boolean>;
    canSplitText: (
        graphicObjectUtils: GraphicObjectUtilsType,
    ) => Promise<boolean>;
    canText2Path: (
        graphicObjectUtils: GraphicObjectUtilsType,
    ) => Promise<boolean>;
    getCharSpace: (
        graphicObjectUtils: GraphicObjectUtilsType,
    ) => Promise<number>;
    getFillInfo: (
        graphicObjectUtils: GraphicObjectUtilsType,
    ) => Promise<FillInfoType>;
    getFont: (
        graphicObjectUtils: GraphicObjectUtilsType,
        isFullName: boolean,
    ) => Promise<string>;
    getFontSize: (
        graphicObjectUtils: GraphicObjectUtilsType,
    ) => Promise<number>;
    getHorizontalScale: (
        graphicObjectUtils: GraphicObjectUtilsType,
    ) => Promise<number>;
    getLineWidth: (
        graphicObjectUtils: GraphicObjectUtilsType,
    ) => Promise<number>;
    getStrokeInfo: (
        graphicObjectUtils: GraphicObjectUtilsType,
    ) => Promise<StrokeInfoType>;
    getTextColorInfo: (
        graphicObjectUtils: GraphicObjectUtilsType,
    ) => Promise<TextColorInfoType>;
    getTextMode: (
        graphicObjectUtils: GraphicObjectUtilsType,
    ) => Promise<FPD_TextMode>;
    getWordSpace: (
        graphicObjectUtils: GraphicObjectUtilsType,
    ) => Promise<number>;
    isFontBold: (
        graphicObjectUtils: GraphicObjectUtilsType,
    ) => Promise<boolean>;
    isFontItalic: (
        graphicObjectUtils: GraphicObjectUtilsType,
    ) => Promise<boolean>;
    isWordSpaceValid: (
        graphicObjectUtils: GraphicObjectUtilsType,
    ) => Promise<FPD_ValidFlag>;
    mergeText: (graphicObjectUtils: GraphicObjectUtilsType) => Promise<boolean>;
    options?: Options;
    setCharSpace: (
        graphicObjectUtils: GraphicObjectUtilsType,
        charSpace: number,
    ) => Promise<boolean>;
    setFillInfo: (
        graphicObjectUtils: GraphicObjectUtilsType,
        isFill: boolean,
        color: RGBColor,
        addUndo: boolean,
    ) => Promise<void>;
    setFont: (
        __namedParameters: {
            bold?: boolean;
            fontName: string;
            graphicObjectUtils: GraphicObjectUtilsType;
            italic?: boolean;
            opType: FPD_FONTOPERATION;
        },
    ) => Promise<boolean>;
    setFontSize: (
        graphicObjectUtils: GraphicObjectUtilsType,
        fontSize: number,
    ) => Promise<boolean>;
    setHorizontalScale: (
        graphicObjectUtils: GraphicObjectUtilsType,
        horizonScale: number,
    ) => Promise<boolean>;
    setLineWidth: (
        graphicObjectUtils: GraphicObjectUtilsType,
        lineWidth: number,
    ) => Promise<boolean>;
    setStrokeInfo: (
        graphicObjectUtils: GraphicObjectUtilsType,
        isStroke: boolean,
        color: RGBColor,
        addUndo: boolean,
    ) => Promise<void>;
    setTextMode: (
        graphicObjectUtils: GraphicObjectUtilsType,
        mode: FPD_TextMode,
    ) => Promise<boolean>;
    setWordSpace: (
        graphicObjectUtils: GraphicObjectUtilsType,
        wordSpace: number,
    ) => Promise<boolean>;
}

Implemented by

Properties

canMergeText: (graphicObjectUtils: GraphicObjectUtilsType) => Promise<boolean>

可以合并文本

Type declaration

    • (graphicObjectUtils: GraphicObjectUtilsType): Promise<boolean>
    • Parameters

      Returns Promise<boolean>

      一个 Promise,解析为一个布尔值,表示是否可以合并文本。

canSplitText: (graphicObjectUtils: GraphicObjectUtilsType) => Promise<boolean>

可以拆分文本

Type declaration

    • (graphicObjectUtils: GraphicObjectUtilsType): Promise<boolean>
    • Parameters

      Returns Promise<boolean>

      一个 Promise,解析为一个布尔值,表示文本是否可以被拆分。

canText2Path: (graphicObjectUtils: GraphicObjectUtilsType) => Promise<boolean>

能否将文本转换为路径

Type declaration

    • (graphicObjectUtils: GraphicObjectUtilsType): Promise<boolean>
    • Parameters

      Returns Promise<boolean>

      一个 Promise,解析为一个布尔值,表示文本是否可以转换为路径。

getCharSpace: (graphicObjectUtils: GraphicObjectUtilsType) => Promise<number>

获取字符间距

Type declaration

getFillInfo: (
    graphicObjectUtils: GraphicObjectUtilsType,
) => Promise<FillInfoType>

获取填充信息

Type declaration

getFont: (
    graphicObjectUtils: GraphicObjectUtilsType,
    isFullName: boolean,
) => Promise<string>

获取字体

Type declaration

    • (
          graphicObjectUtils: GraphicObjectUtilsType,
          isFullName: boolean,
      ): Promise<string>
    • Parameters

      • graphicObjectUtils: GraphicObjectUtilsType

        要使用的图形对象工具。

      • isFullName: boolean

        是否获取字体的全名。

      Returns Promise<string>

      一个解析为字体名称的 Promise。

getFontSize: (graphicObjectUtils: GraphicObjectUtilsType) => Promise<number>

获取字体大小

Type declaration

getHorizontalScale: (
    graphicObjectUtils: GraphicObjectUtilsType,
) => Promise<number>

获取水平缩放比例

Type declaration

getLineWidth: (graphicObjectUtils: GraphicObjectUtilsType) => Promise<number>

获取线宽

Type declaration

getStrokeInfo: (
    graphicObjectUtils: GraphicObjectUtilsType,
) => Promise<StrokeInfoType>

获取笔画信息

Type declaration

getTextColorInfo: (
    graphicObjectUtils: GraphicObjectUtilsType,
) => Promise<TextColorInfoType>

获取文本颜色信息

Type declaration

getTextMode: (
    graphicObjectUtils: GraphicObjectUtilsType,
) => Promise<FPD_TextMode>

获取文本模式

Type declaration

getWordSpace: (graphicObjectUtils: GraphicObjectUtilsType) => Promise<number>

获取单词间距

Type declaration

isFontBold: (graphicObjectUtils: GraphicObjectUtilsType) => Promise<boolean>

获取字体加粗信息

Type declaration

    • (graphicObjectUtils: GraphicObjectUtilsType): Promise<boolean>
    • Parameters

      Returns Promise<boolean>

      一个 Promise,解析为一个布尔值,表示字体是否为加粗。

isFontItalic: (graphicObjectUtils: GraphicObjectUtilsType) => Promise<boolean>

获取字体是否为斜体

Type declaration

    • (graphicObjectUtils: GraphicObjectUtilsType): Promise<boolean>
    • Parameters

      Returns Promise<boolean>

      一个 Promise,解析为一个布尔值,表示字体是否为斜体。

isWordSpaceValid: (
    graphicObjectUtils: GraphicObjectUtilsType,
) => Promise<FPD_ValidFlag>

判断单词间距是否有效

Type declaration

mergeText: (graphicObjectUtils: GraphicObjectUtilsType) => Promise<boolean>

合并文本

Type declaration

    • (graphicObjectUtils: GraphicObjectUtilsType): Promise<boolean>
    • Parameters

      Returns Promise<boolean>

      一个 Promise,解析为一个布尔值,用于指示文本是否合并成功。

options?: Options
setCharSpace: (
    graphicObjectUtils: GraphicObjectUtilsType,
    charSpace: number,
) => Promise<boolean>

设置字符间距

Type declaration

    • (
          graphicObjectUtils: GraphicObjectUtilsType,
          charSpace: number,
      ): Promise<boolean>
    • Parameters

      Returns Promise<boolean>

      一个 Promise,当字符间距设置成功时会解析为 true,否则为 false。

setFillInfo: (
    graphicObjectUtils: GraphicObjectUtilsType,
    isFill: boolean,
    color: RGBColor,
    addUndo: boolean,
) => Promise<void>

设置填充信息

Type declaration

    • (
          graphicObjectUtils: GraphicObjectUtilsType,
          isFill: boolean,
          color: RGBColor,
          addUndo: boolean,
      ): Promise<void>
    • Parameters

      • graphicObjectUtils: GraphicObjectUtilsType

        要使用的图形对象工具。

      • isFill: boolean

        是否启用填充。

      • color: RGBColor

        填充颜色。

      • addUndo: boolean

        是否添加撤销步骤。

      Returns Promise<void>

      当填充信息设置完成时解析的 Promise。

setFont: (
    __namedParameters: {
        bold?: boolean;
        fontName: string;
        graphicObjectUtils: GraphicObjectUtilsType;
        italic?: boolean;
        opType: FPD_FONTOPERATION;
    },
) => Promise<boolean>

设置字体

Type declaration

    • (
          __namedParameters: {
              bold?: boolean;
              fontName: string;
              graphicObjectUtils: GraphicObjectUtilsType;
              italic?: boolean;
              opType: FPD_FONTOPERATION;
          },
      ): Promise<boolean>
    • Parameters

      Returns Promise<boolean>

      一个 Promise,解析为一个布尔值,表示字体是否设置成功。

setFontSize: (
    graphicObjectUtils: GraphicObjectUtilsType,
    fontSize: number,
) => Promise<boolean>

设置字体大小

Type declaration

    • (graphicObjectUtils: GraphicObjectUtilsType, fontSize: number): Promise<boolean>
    • Parameters

      Returns Promise<boolean>

      一个 Promise,解析为一个布尔值,表示字体大小是否设置成功。

setHorizontalScale: (
    graphicObjectUtils: GraphicObjectUtilsType,
    horizonScale: number,
) => Promise<boolean>

设置水平缩放

Type declaration

    • (
          graphicObjectUtils: GraphicObjectUtilsType,
          horizonScale: number,
      ): Promise<boolean>
    • Parameters

      Returns Promise<boolean>

      一个 Promise,解析为一个布尔值,表示水平缩放是否设置成功。

setLineWidth: (
    graphicObjectUtils: GraphicObjectUtilsType,
    lineWidth: number,
) => Promise<boolean>

设置线宽

Type declaration

    • (
          graphicObjectUtils: GraphicObjectUtilsType,
          lineWidth: number,
      ): Promise<boolean>
    • Parameters

      • graphicObjectUtils: GraphicObjectUtilsType

        要使用的图形对象工具。

      • lineWidth: number

        要设置的线宽。

      Returns Promise<boolean>

      一个 Promise,解析为布尔值,表示线宽是否设置成功。

setStrokeInfo: (
    graphicObjectUtils: GraphicObjectUtilsType,
    isStroke: boolean,
    color: RGBColor,
    addUndo: boolean,
) => Promise<void>

设置描边信息

Type declaration

    • (
          graphicObjectUtils: GraphicObjectUtilsType,
          isStroke: boolean,
          color: RGBColor,
          addUndo: boolean,
      ): Promise<void>
    • Parameters

      • graphicObjectUtils: GraphicObjectUtilsType

        要使用的图形对象工具。

      • isStroke: boolean

        是否启用描边。

      • color: RGBColor

        描边颜色。

      • addUndo: boolean

        是否添加撤销步骤。

      Returns Promise<void>

      当描边信息设置完成时解析的 Promise。

setTextMode: (
    graphicObjectUtils: GraphicObjectUtilsType,
    mode: FPD_TextMode,
) => Promise<boolean>

设置文本模式

Type declaration

setWordSpace: (
    graphicObjectUtils: GraphicObjectUtilsType,
    wordSpace: number,
) => Promise<boolean>

设置单词间距

Type declaration

    • (
          graphicObjectUtils: GraphicObjectUtilsType,
          wordSpace: number,
      ): Promise<boolean>
    • Parameters

      Returns Promise<boolean>

      一个 Promise,解析为一个布尔值,指示单词间距是否设置成功。