Skip to main content

ApiDrawing

Class representing a graphical object.

Methods​

The following table lists the available methods.

MethodReturnsDescription
CopyApiDrawingCreates a copy of the specified drawing object.
DeletebooleanDeletes the specified drawing object from the parent.
FillbooleanSets the fill formatting properties to the current graphic object.
GetClassType"drawing"Returns the type of the ApiDrawing class.
GetDescriptionstring | nullGets the description of the current drawing.
GetFillApiFill | nullGets the fill formatting properties from the current graphic object.
GetFlipHboolean | nullGet horizontal flip of current drawing.
GetFlipVboolean | nullGet vertical flip of current drawing.
GetHeightEMUReturns the height of the current drawing.
GetInternalIdstringReturns an internal ID of the current drawing.
GetLineApiStroke | nullGets the outline properties from the current graphic object.
GetLockAspectbooleanReturns whether the aspect ratio of the drawing is locked.
GetLockValuebooleanReturns the lock value for the specified lock type of the current drawing.
GetNamestringReturns the name of the current drawing.
GetParentPageApiPage | null | undefinedReturns the type of the ApiDrawing class.
GetPosXEMUGets the x position of the drawing on the page.
GetPosYEMUGets the y position of the drawing on the page.
GetRotationnumberReturns the rotation angle of the current drawing object.
GetShadowApiShadow | nullReturns the shadow of the current graphic object.
GetTextRangeApiTextRange | nullReturns a text range that covers the whole text of the current drawing. Creates a text body if the drawing does not yet have one.
GetTitlestring | nullGets the title of the current drawing.
GetWidthEMUReturns the width of the current drawing.
HasTextContentbooleanChecks whether the current drawing has a text body.
SelectbooleanSelects the current graphic object.
SetDescriptionbooleanSets the description of the current drawing.
SetFillbooleanSets the fill formatting properties to the current graphic object.
SetFlipHbooleanSets the horizontal flip of the current drawing.
SetFlipVbooleanSets the vertical flip of the current drawing.
SetLinebooleanSets the outline properties to the current graphic object.
SetLockAspectbooleanSets whether the aspect ratio of the drawing is locked.
SetLockValuebooleanSets the lock value to the specified lock type of the current drawing.
SetNamebooleanSets the name of the current drawing. If another drawing with the same name already exists, that drawing's name will be reset to a default auto-generated name. OLE objects do not support a custom name, so for them this method always returns false.
SetOutLinebooleanSets the outline properties to the current graphic object.
SetPosXbooleanSets the x position of the drawing on the page.
SetPosYbooleanSets the y position of the drawing on the page.
SetPositionbooleanSets the position of the drawing on the page.
SetRotationbooleanSets the rotation angle to the current drawing object.
SetShadowbooleanSets the shadow to the current graphic object.
SetSizebooleanSets the size of the object (image, shape, chart) bounding box.
SetTitlebooleanSets the title of the current drawing.
UnselectbooleanRemoves the current graphic object from the selection.