ShapeFill
Defined in: src/core/document-model/types.ts:1188
A shape’s fill: none, a solid colour, a ShapeGradient, or a picture.
Properties
Section titled “Properties”alpha?
Section titled “alpha?”
readonlyoptionalalpha?:number
Defined in: src/core/document-model/types.ts:1257
§20.1.2.3.1 a:alpha / §14.1.2.5 @opacity — how opaque the fill is,
0..1. Absent is opaque. The colour above is the fill’s own, NOT composited
over the paper: what is behind the shape shows through it.
colorHex?
Section titled “colorHex?”
readonlyoptionalcolorHex?:string
Defined in: src/core/document-model/types.ts:1190
duotone?
Section titled “duotone?”
readonlyoptionalduotone?:object
Defined in: src/core/document-model/types.ts:1245
§20.1.8.23 a:duotone — the picture recoloured into two tones: its dark
end becomes the first colour, its light end the second. An Office theme
that ships a photograph tints it this way, so a deck whose background is a
brown ridged texture is stored as a grey one (corpus: themes.pptx).
highlightHex
Section titled “highlightHex”
readonlyhighlightHex:string
shadowHex
Section titled “shadowHex”
readonlyshadowHex:string
gradient?
Section titled “gradient?”
readonlyoptionalgradient?:ShapeGradient
Defined in: src/core/document-model/types.ts:1191
imageCrop?
Section titled “imageCrop?”
readonlyoptionalimageCrop?:ImageCrop
Defined in: src/core/document-model/types.ts:1230
§20.1.8.30 a:stretch/a:fillRect (or an a:srcRect beside it) — the part
of the picture the box shows, as the fractions cut from each side.
imageFillRect?
Section titled “imageFillRect?”
readonlyoptionalimageFillRect?:object
Defined in: src/core/document-model/types.ts:1246
bottom
Section titled “bottom”
readonlybottom:number
readonlyleft:number
readonlyright:number
readonlytop:number
imageResource?
Section titled “imageResource?”
readonlyoptionalimageResource?:ResourceId
Defined in: src/core/document-model/types.ts:1225
§20.1.8.14 a:blipFill — the picture painted across the shape’s box. A
DrawingML picture IS a shape with one of these, which is how a pic:pic
inside a group reaches the page.
readonlykind:ShapeFillKind
Defined in: src/core/document-model/types.ts:1189
tiled?
Section titled “tiled?”
readonlyoptionaltiled?:boolean
Defined in: src/core/document-model/types.ts:1197
§14.1.2.5 @type="tile" — the picture REPEATS at its own size rather than
stretching over the box. A parchment behind a page, a texture behind a
text box: stretched, such a fill is a blur where it should be a pattern.
tileFromCentre?
Section titled “tileFromCentre?”
readonlyoptionaltileFromCentre?:boolean
Defined in: src/core/document-model/types.ts:1219
Where the grid of copies is anchored. DrawingML pins it to the shape’s
top-left corner (§20.1.8.58 a:tile @algn, which defaults to tl); an
MS-ODRAW texture fill (§2.3.7.13 fillOriginX/fillOriginY, both
defaulting to nothing) centres it on the shape instead. It only shows when
the copies do not divide the box evenly — and it shows most when ONE copy
is larger than the box, where the difference is which part of the picture
is visible at all.
tileScale?
Section titled “tileScale?”
readonlyoptionaltileScale?:object
Defined in: src/core/document-model/types.ts:1209
§20.1.8.58 a:tile @sx @sy — how far the picture is scaled BEFORE it is
repeated, as fractions of its own size (1 = 100 %). A texture halved tiles
four times as often, and read as a plain repeat it tiles once.
readonlysx:number
readonlysy:number
tileSizePt?
Section titled “tileSizePt?”
readonlyoptionaltileSizePt?:object
Defined in: src/core/document-model/types.ts:1203
The size ONE copy of a tiled fill occupies, when the shape states it —
MS-ODRAW §2.3.7.11/.12 fillWidth / fillHeight. Absent, a tile is the
picture at its own resolution, which is the default both formats give.
heightPt
Section titled “heightPt”
readonlyheightPt:number
widthPt
Section titled “widthPt”
readonlywidthPt:number