ReadonlyisFor runtime type checking.
ReadonlyisFor runtime type checking.
OptionalacceptThe flip this content takes when asked to mirror as flip states.
Defined by content that can be mirrored, such as a shape or a picture; absent, the content cannot: a frame dragged through its opposite edge is moved there but not mirrored, as Excel does with a chart. Must be pure, as acceptRotation is. A connector may accept each axis on its own.
OptionalacceptThe rotation this content takes when asked to turn by degrees, clockwise.
Add Listeners.
Batches all 'transactional' changes until they have all be committed or rolled back.
Optionaloptions: string | ITransaction.OperationOptions
Description of the operation or additional options. Used for tracking undo/redo and history. Default Value User Operation.
Any changes that are made to this object will be reflected in the local record but not committed to the transactional store until the batch is popped.
Useful for operations that are longer running but generally not recommended as it keeps a transaction open. doBatch is the preferred option.
Close the record and cleans resources. Can't be undone.
Deletes the picture, and with it the movable that places it.
Optionaloptions: ITransaction.OperationOptionsProvides a mechanism to perform a set of operations in a batch.
A callback that performs multiple operations all within the same transaction.
Optionaloptions: string | ITransaction.OperationOptions
Description of the operation or additional options. Used for tracking undo/redo and history. Default Value User Operation.
OptionalgetThe points a connector's end may be glued to, in a width by height frame of this
content, before the frame is placed.
Optionaloptions: ConnectionsOptionsAbsent, the four edge midpoints — top, left, bottom, right, numbered in that order, each
leaving straight out — as Excel offers on a picture, a chart, a slicer or a control. A
shape is the exception and answers its geometry's own sites (a triangle's three, a
connector's none); a group answers none, since Excel glues to a group's members and never
to the group. Must be synchronous: null means the content cannot answer yet and will call
options.onReady when it can.
Returns the part of the image shown, as percentages of the image's size inset from each edge.
OptionalgetHow a movable of this content moves and sizes with the cells under it when it is added without an anchor type.
Absent, it moves and sizes with them (IAnchored.Type.TwoCell), as Excel inserts a shape or a chart. A picture moves with its cell but keeps its size.
Returns the alternative text used by assistive technologies, or null if none has been set.
Returns a local object URL for placing in an image tag.
Returns the shape's outline at a size, for drawing the picture cropped to its shape.
Optionalwidth: number
The frame's width in pixels. Defaults to the movable's.
Optionalheight: number
The frame's height in pixels. Defaults to the movable's.
null for a preset this SDK does not know, or for a picture with no movable and no size.
Returns the hyperlink a click on the picture follows, or null for none.
A unique identifier for the record. This will never change.
This enables the record to be identified across transactions and users in a collaborative environment. The id is store-issued (IStore.create); the store keys all state by it.
Returns the movable that places the content on the sheet, or null if it is not placed by
one.
OptionalgetReturns the cells the content names - a chart's series, a control's linked cell, a slicer's
column - or null when it names none.
Not where the movable sits: that is IMovable.getRange. The references are formulas the calculation engine holds, so they follow the cells they name through inserts, deletes, cuts, sheet renames and undo, and ContentEvents.onReferencesChange is announced when they have. A reference to deleted cells is left out. Without a running engine the references read as they were set.
Returns the resource associated with this picture.
Returns the shape the picture is cropped to: its preset geometry.
A DrawingML preset id (IGeometry.Preset): rect for a picture that is not cropped to
a shape, which is most of them. A file may name a preset this SDK does not know; it is
returned as the file states it.
What the picture's frame draws with: the fill behind the image and the border around it. A picture has no theme style, so each is only what the picture states; by default neither draws, and a border shows only once it has a color (a width alone draws nothing, as in Excel). The same object answers for the life of the picture.
Returns an immutable type string.
Returns a label for the kind of content, such as Chart or Picture.
Every committed update gives the record a new, strictly increasing version id.
Used with getId to uniquely identify a version of the record.
The id is an identity, not a per-record count: ids are drawn from a single store-wide sequence bumped once per commit, so all records written in the same commit share an id and a given record's ids increase but are not sequential.
Records are immutable so a restore/revert doesn't change them — it repoints, and the version id reported is the one for the snapshot the store is currently at. Version ids are never reused: a write after an undo receives an id higher than any previously issued, so a stale reader can always detect the change.
Returns true if no more operations are allowed.
OptionalisIf the model unable to be modified.
If the model unable to be modified.
Sets the part of the image shown. The frame stays as it is, so the part shown is stretched over it; to keep the image's scale, change the frame with IMovable.setBounds as well.
Percentages of the image's size, inset from each edge; null shows the whole image.
Optionaloptions: ITransaction.OperationOptionsSet the alternative text used by assistive technologies.
Sets the hyperlink a click on the picture follows.
An address, the link's properties, or null to remove it. An address takes the
form a cell's does: a url, or #Sheet1!A1 for a location in this workbook.
Optionaloptions: ITransaction.OperationOptionsOptionalsetSet the name.
The name of the content.
Shows another image, as Excel's Change Picture does: the frame's size and placement and the picture's formatting stay; only the image changes.
The resource is taken as it is, not read: a source that cannot be fetched shows nothing. Read
it first (toBuffer()) to be sure of it.
A url, a resource, or the options to add one with. A url or options take the sheet's resources, so a picture that is not on a sheet takes a resource.
Optionaloptions: ITransaction.OperationOptionsCrops the picture to a shape, as Excel's Crop to Shape does: the image, its frame, border and effects stay; the picture is clipped to the preset's outline.
A picture takes any closed preset; a line or connector preset is refused.
A DrawingML preset id (IGeometry.Preset); rect crops to nothing.
Optionaloptions: ITransaction.OperationOptionsReturn an html string or null if not supported.
Returns an image blob.
Interface for working with Pictures (both Images and SVG).