ApiDrawing

class ApiDrawing

Description

Class representing a graphical object.

Instance Methods

GetClassType(): drawing

Returns a type of the ApiDrawing class.

GetWidth(): EMU

Returns the width of the current drawing.

GetHeight(): EMU

Returns the height of the current drawing.

SetSize(nWidth, nHeight)

Sets the size of the object (image, shape, chart) bounding box.

SetPosition(nPosX, nPosY)

Sets the position of the drawing on the slide.

GetParent(): ApiSlide | ApiLayout | ApiMaster | "null"

Returns the drawing parent object.

GetParentSlide(): ApiSlide | "null"

Returns the drawing parent slide.

GetParentLayout(): ApiLayout | "null"

Returns the drawing parent slide layout.

GetParentMaster(): ApiMaster | "null"

Returns the drawing parent slide master.

Copy(): ApiDrawing

Creates a copy of the specified drawing object.

Delete(): boolean

Deletes the specified drawing object from the parent.

SetPlaceholder(oPlaceholder): boolean

Sets the specified placeholder to the current drawing object.

GetPlaceholder(): ApiPlaceholder | "null"

Returns a placeholder from the current drawing object.

GetLockValue(sType): bool

Returns the lock value for the specified lock type of the current drawing.

SetLockValue(sType, bValue): bool

Sets the lock value to the specified lock type of the current drawing.

ToJSON(): JSON

Converts the ApiDrawing object into the JSON object.

Select()

Selects the current graphic object.

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).