PowerPoint.Interfaces.ShapeData interface
An interface describing the data returned by calling shape.toJSON().
Properties
| alt |
The alt text description of the Shape. Alt text provides alternative, text-based representations of the information contained in the Shape. This information is useful for people with vision or cognitive impairments who may not be able to see or understand the shape. |
| alt |
The alt text title of the Shape. Alt text provides alternative, text-based representations of the information contained in the Shape. This information is useful for people with vision or cognitive impairments who may not be able to see or understand the shape. A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content. |
| creation |
Gets the creation ID of the shape. Returns |
| height | Specifies the height, in points, of the shape. Throws an |
| id | Gets the unique ID of the shape. |
| is |
Represents whether the shape is decorative or not. Decorative objects add visual interest but aren't informative (e.g. stylistic borders). People using screen readers will hear these are decorative so they know they aren't missing any important information. |
| left | The distance, in points, from the left side of the shape to the left side of the slide. |
| level | Returns the level of the specified shape.
|
| name | Specifies the name of this shape. |
| rotation | Specifies the rotation, in degrees, of the shape around the z-axis. A positive value indicates clockwise rotation, and a negative value indicates counterclockwise rotation. |
| top | The distance, in points, from the top edge of the shape to the top edge of the slide. |
| type | Returns the type of this shape. See PowerPoint.ShapeType for details. |
| visible | Specifies if the shape is visible. |
| width | Specifies the width, in points, of the shape. Throws an |
| z |
Returns the z-order position of the shape, with 0 representing the bottom of the order stack. Every shape on a slide has a unique z-order, but each slide also has a unique z-order stack, so two shapes on separate slides could have the same z-order number. |
Property Details
altTextDescription
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
The alt text description of the Shape.
Alt text provides alternative, text-based representations of the information contained in the Shape. This information is useful for people with vision or cognitive impairments who may not be able to see or understand the shape.
altTextDescription?: string;
Property Value
string
Remarks
altTextTitle
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
The alt text title of the Shape.
Alt text provides alternative, text-based representations of the information contained in the Shape. This information is useful for people with vision or cognitive impairments who may not be able to see or understand the shape. A title can be read to a person with a disability and is used to determine whether they wish to hear the description of the content.
altTextTitle?: string;
Property Value
string
Remarks
creationId
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Gets the creation ID of the shape. Returns null if the shape has no creation ID.
creationId?: string | null;
Property Value
string | null
Remarks
height
Specifies the height, in points, of the shape. Throws an InvalidArgument exception when set with a negative value.
height?: number;
Property Value
number
Remarks
id
Gets the unique ID of the shape.
id?: string;
Property Value
string
Remarks
isDecorative
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Represents whether the shape is decorative or not.
Decorative objects add visual interest but aren't informative (e.g. stylistic borders). People using screen readers will hear these are decorative so they know they aren't missing any important information.
isDecorative?: boolean;
Property Value
boolean
Remarks
left
The distance, in points, from the left side of the shape to the left side of the slide.
left?: number;
Property Value
number
Remarks
level
Returns the level of the specified shape.
A level of 0 means the shape isn't part of a group.
A level of 1 means the shape is part of a top-level group.
A level greater than 1 indicates the shape is a nested group.
level?: number;
Property Value
number
Remarks
name
Specifies the name of this shape.
name?: string;
Property Value
string
Remarks
rotation
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Specifies the rotation, in degrees, of the shape around the z-axis. A positive value indicates clockwise rotation, and a negative value indicates counterclockwise rotation.
rotation?: number;
Property Value
number
Remarks
top
The distance, in points, from the top edge of the shape to the top edge of the slide.
top?: number;
Property Value
number
Remarks
type
Returns the type of this shape. See PowerPoint.ShapeType for details.
type?: PowerPoint.ShapeType | "Unsupported" | "Image" | "GeometricShape" | "Group" | "Line" | "Table" | "Callout" | "Chart" | "ContentApp" | "Diagram" | "Freeform" | "Graphic" | "Ink" | "Media" | "Model3D" | "Ole" | "Placeholder" | "SmartArt" | "TextBox";
Property Value
PowerPoint.ShapeType | "Unsupported" | "Image" | "GeometricShape" | "Group" | "Line" | "Table" | "Callout" | "Chart" | "ContentApp" | "Diagram" | "Freeform" | "Graphic" | "Ink" | "Media" | "Model3D" | "Ole" | "Placeholder" | "SmartArt" | "TextBox"
Remarks
visible
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Specifies if the shape is visible.
visible?: boolean;
Property Value
boolean
Remarks
width
Specifies the width, in points, of the shape. Throws an InvalidArgument exception when set with a negative value.
width?: number;
Property Value
number
Remarks
zOrderPosition
Returns the z-order position of the shape, with 0 representing the bottom of the order stack. Every shape on a slide has a unique z-order, but each slide also has a unique z-order stack, so two shapes on separate slides could have the same z-order number.
zOrderPosition?: number;
Property Value
number