ApiShape
Class representing a shape.
ApiShape is a subclass of ApiDrawing.
Methods
The following table lists the available methods.
| Method | Returns | Description |
|---|---|---|
| Copy | ApiShape | Creates a copy of the current shape. |
| Delete | boolean | Deletes the specified drawing object from the parent. |
| Fill | boolean | Sets the fill formatting properties to the current graphic object. |
| GetClassType | "shape" | Returns the type of the ApiShape class. |
| GetContent | ApiDocumentContent | null | undefined | Returns the shape inner contents where a paragraph or text runs can be inserted. |
| GetDescription | string | null | Gets the description of the current drawing. |
| GetDocContent | ApiDocumentContent | null | undefined | Returns the shape inner contents where a paragraph or text runs can be inserted. |
| GetFill | ApiFill | null | Gets the fill properties from the current shape. |
| GetFlipH | boolean | null | Get horizontal flip of current drawing. |
| GetFlipV | boolean | null | Get vertical flip of current drawing. |
| GetGeometry | ApiGeometry | Returns the geometry object from the current shape. |
| GetHeight | EMU | Returns the height of the current drawing. |
| GetInternalId | string | Returns an internal ID of the current drawing. |
| GetLine | ApiStroke | null | Gets the outline properties from the current shape. |
| GetLockAspect | boolean | Returns whether the aspect ratio of the drawing is locked. |
| GetLockValue | boolean | Returns the lock value for the specified lock type of the current drawing. |
| GetName | string | Returns the name of the current drawing. |
| GetParentPage | ApiPage | null | undefined | Returns the type of the ApiDrawing class. |
| GetPosX | EMU | Gets the x position of the drawing on the page. |
| GetPosY | EMU | Gets the y position of the drawing on the page. |
| GetRotation | number | Returns the rotation angle of the current drawing object. |
| GetShadow | ApiShadow | null | Returns the shadow of the current graphic object. |
| GetTextFit | TextFitType | Returns the text autofit type of the current shape. |
| GetTextRange | ApiTextRange | null | Returns a text range that covers the whole text of the current drawing. Creates a text body if the drawing does not yet have one. |
| GetTitle | string | null | Gets the title of the current drawing. |
| GetVerticalTextAlign | VerticalTextAlign | Gets the vertical alignment from the shape content where a paragraph or text runs can be inserted. |
| GetWidth | EMU | Returns the width of the current drawing. |
| HasTextContent | boolean | Checks whether the current drawing has a text body. |
| Select | boolean | Selects the current graphic object. |
| SetDescription | boolean | Sets the description of the current drawing. |
| SetFill | boolean | Sets the fill properties to the current shape. |
| SetFlipH | boolean | Sets the horizontal flip of the current drawing. |
| SetFlipV | boolean | Sets the vertical flip of the current drawing. |
| SetGeometry | boolean | Sets a custom geometry for the current shape. |
| SetLine | boolean | Sets the outline properties to the current shape. |
| SetLockAspect | boolean | Sets whether the aspect ratio of the drawing is locked. |
| SetLockValue | boolean | Sets the lock value to the specified lock type of the current drawing. |
| SetName | boolean | Sets 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. |
| SetOutLine | boolean | Sets the outline properties to the current graphic object. |
| SetPaddings | boolean | Sets the text paddings to the current shape. |
| SetPosX | boolean | Sets the x position of the drawing on the page. |
| SetPosY | boolean | Sets the y position of the drawing on the page. |
| SetPosition | boolean | Sets the position of the drawing on the page. |
| SetRotation | boolean | Sets the rotation angle to the current drawing object. |
| SetShadow | boolean | Sets the shadow to the current graphic object. |
| SetSize | boolean | Sets the size of the object (image, shape, chart) bounding box. |
| SetTextFit | boolean | Sets the text autofit type to the current shape. |
| SetTitle | boolean | Sets the title of the current drawing. |
| SetVerticalTextAlign | boolean | Sets the vertical alignment to the shape content where a paragraph or text runs can be inserted. |
| Unselect | boolean | Removes the current graphic object from the selection. |