interface GraphicObjectUtilsType {
    align: (mode: FPD_AlignMode) => Promise<void>;
    center: (mode: FPD_CenterMode) => Promise<void>;
    changeRenderingOrder: (operation: number) => Promise<void>;
    copy: () => Promise<boolean>;
    cut: () => Promise<void>;
    delete: () => Promise<void>;
    flip: (vertical?: boolean) => Promise<void>;
    getHeight: () => Promise<number>;
    getOpacity: () => Promise<number>;
    getType: () => Promise<FPD_GraphicObjectUtilsType>;
    getWidth: () => Promise<number>;
    getXPosition: () => Promise<boolean>;
    getYPosition: () => Promise<boolean>;
    move: (
        destPage: PageType,
        docView: DocViewType,
        offset: Point,
    ) => Promise<void>;
    options?: Options;
    rotate: (rotate: number) => Promise<void>;
    scale: (rect: Rect) => Promise<void>;
    setHeight: (height: number) => Promise<boolean>;
    setOpacity: (opacity: number, undo?: boolean) => Promise<boolean>;
    setWidth: (width: number) => Promise<boolean>;
    setXPosition: (posX: number) => Promise<boolean>;
    setYPosition: (posY: number) => Promise<boolean>;
    shear: (angle: number) => Promise<void>;
    size: (mode: FPD_SizeMode) => Promise<void>;
}

Implemented by

Properties

align: (mode: FPD_AlignMode) => Promise<void>

Aligns the graphic object based on the specified alignment mode.

Type declaration

    • (mode: FPD_AlignMode): Promise<void>
    • Parameters

      Returns Promise<void>

      A promise that resolves when the alignment operation is complete.

center: (mode: FPD_CenterMode) => Promise<void>

Centers the graphic object based on the specified center mode.

Type declaration

    • (mode: FPD_CenterMode): Promise<void>
    • Parameters

      Returns Promise<void>

      A promise that resolves when the centering operation is complete.

changeRenderingOrder: (operation: number) => Promise<void>

Changes the rendering order of the graphic object.

Type declaration

    • (operation: number): Promise<void>
    • Parameters

      • operation: number

        The operation to perform (0 for move up, 1 for move down).

      Returns Promise<void>

      A promise that resolves when the rendering order change is complete.

copy: () => Promise<boolean>

Copies the graphic object.

Type declaration

    • (): Promise<boolean>
    • Returns Promise<boolean>

      A promise that resolves to true if the copy operation succeeded, or false if it failed.

cut: () => Promise<void>

Cuts the graphic object.

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

      A promise that resolves when the cut operation is complete.

delete: () => Promise<void>

Deletes the graphic object.

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

      A promise that resolves when the delete operation is complete.

flip: (vertical?: boolean) => Promise<void>

Flips the graphic object either vertically or horizontally.

Type declaration

    • (vertical?: boolean): Promise<void>
    • Parameters

      • Optionalvertical: boolean

        If true, flip vertically; if false, flip horizontally.

      Returns Promise<void>

      A promise that resolves when the flip operation is complete.

getHeight: () => Promise<number>

get the height of the graphic object

Type declaration

    • (): Promise<number>
    • Returns Promise<number>

      A promise that resolves to the height value or -1 if the operation failed.

getOpacity: () => Promise<number>

get the opacity of the graphic object

Type declaration

    • (): Promise<number>
    • Returns Promise<number>

      A promise that resolves to the opacity value or Infinity if the operation failed.

getType: () => Promise<FPD_GraphicObjectUtilsType>

Gets the type of the graphic object utility.

Type declaration

getWidth: () => Promise<number>

get the width of the graphic object

Type declaration

    • (): Promise<number>
    • Returns Promise<number>

      A promise that resolves to the width value or -1 if the operation failed.

getXPosition: () => Promise<boolean>

get the X position of the graphic object

Type declaration

    • (): Promise<boolean>
    • Returns Promise<boolean>

      A promise that resolves to the X position value or false if the operation failed.

getYPosition: () => Promise<boolean>

get the Y position of the graphic object

Type declaration

    • (): Promise<boolean>
    • Returns Promise<boolean>

      A promise that resolves to the Y position value or false if the operation failed.

move: (destPage: PageType, docView: DocViewType, offset: Point) => Promise<void>

Moves the graphic object to a specified page and position.

Type declaration

    • (destPage: PageType, docView: DocViewType, offset: Point): Promise<void>
    • Parameters

      • destPage: PageType

        The destination page to move the graphic object to.

      • docView: DocViewType

        The document view context for the move operation.

      • offset: Point

        The offset position to move the graphic object to.

      Returns Promise<void>

      A promise that resolves when the move operation is complete.

options?: Options
rotate: (rotate: number) => Promise<void>

Rotates the graphic object by the specified angle.

Type declaration

    • (rotate: number): Promise<void>
    • Parameters

      • rotate: number

        The angle in degrees to rotate the graphic object.

      Returns Promise<void>

      A promise that resolves when the rotation is complete.

scale: (rect: Rect) => Promise<void>

Scales the graphic object to fit within the specified rectangle.

Type declaration

    • (rect: Rect): Promise<void>
    • Parameters

      • rect: Rect

        The rectangle to scale the graphic object to fit within.

      Returns Promise<void>

      A promise that resolves when the scaling operation is complete.

setHeight: (height: number) => Promise<boolean>

Sets the height of the graphic object.

Type declaration

    • (height: number): Promise<boolean>
    • Parameters

      • height: number

        The height value to set.

      Returns Promise<boolean>

      A promise that resolves to true if the operation succeeded, or false if it failed.

setOpacity: (opacity: number, undo?: boolean) => Promise<boolean>

Sets the opacity of the graphic object.

Type declaration

    • (opacity: number, undo?: boolean): Promise<boolean>
    • Parameters

      • opacity: number

        The opacity value to set (0-100).

      • Optionalundo: boolean

        Whether to allow undoing the operation. default false

      Returns Promise<boolean>

      A promise that resolves to true if the operation succeeded, or false if it failed.

setWidth: (width: number) => Promise<boolean>

Sets the width of the graphic object.

Type declaration

    • (width: number): Promise<boolean>
    • Parameters

      • width: number

        The width value to set.

      Returns Promise<boolean>

      A promise that resolves to true if the operation succeeded, or false if it failed.

setXPosition: (posX: number) => Promise<boolean>

Sets the X position of the graphic object.

Type declaration

    • (posX: number): Promise<boolean>
    • Parameters

      • posX: number

        The X position value to set.

      Returns Promise<boolean>

      A promise that resolves to true if the operation succeeded, or false if it failed.

setYPosition: (posY: number) => Promise<boolean>

Sets the Y position of the graphic object.

Type declaration

    • (posY: number): Promise<boolean>
    • Parameters

      • posY: number

        The Y position value to set.

      Returns Promise<boolean>

      A promise that resolves to true if the operation succeeded, or false if it failed.

shear: (angle: number) => Promise<void>

Shears the graphic object by the specified angle.

Type declaration

    • (angle: number): Promise<void>
    • Parameters

      • angle: number

        The angle in degrees to shear the graphic object.

      Returns Promise<void>

      A promise that resolves when the shear operation is complete.

size: (mode: FPD_SizeMode) => Promise<void>

Resizes the graphic object based on the specified size mode.

Type declaration

    • (mode: FPD_SizeMode): Promise<void>
    • Parameters

      Returns Promise<void>

      A promise that resolves when the sizing operation is complete.