Fill
Describes how a fill is filled with color or media.
If both media and color are defined, media takes precedence.
Properties
mediaContainerobjectRead-onlyA media fill, if any.
setfunctionParameters
stateMediaFillState | undefinedA state that creates an image fill.
typestringRead-onlyThe type of media.
The only valid value is "image".
imageRefImageRefRead-onlyA unique identifier that points to an image asset in Canva's backend.
flipXbooleanIf true, the image is flipped horizontally.
flipYbooleanIf true, the image is flipped vertically.
A state that creates a video fill.
typestringRead-onlyThe type of media.
The only valid value is "video".
videoRefVideoRefRead-onlyA unique identifier that points to a video asset in Canva's backend.
flipXbooleanIf true, the video is flipped horizontally.
flipYbooleanIf true, the video is flipped vertically.
Returns
void
refMediaFill | undefinedAn image that fills the interior of a media.
typestringRead-onlyThe type of media.
The only valid value is "image".
imageRefImageRefRead-onlyA unique identifier that points to an image asset in Canva's backend.
flipXbooleanIf true, the image is flipped horizontally.
flipYbooleanIf true, the image is flipped vertically.
A video that fills the interior of a media.
typestringRead-onlyThe type of media.
The only valid value is "video".
videoRefVideoRefRead-onlyA unique identifier that points to a video asset in Canva's backend.
flipXbooleanIf true, the video is flipped horizontally.
flipYbooleanIf true, the video is flipped vertically.
colorContainerobjectRead-onlyA color fill, if any.
setfunctionParameters
stateSolidFillState | undefinedtypestringRead-onlyThe type of color.
The only valid value is "solid".
colorstringThe color of the fill.
This must be a valid, six-digit hex code, prefixed with a # symbol.
- Must be six characters long.
- Must start with a
#. - Must use lowercase letters.
Example
"#ff0099"
Returns
void
refColorFill | undefinedA solid color that fills an interior.
typestringRead-onlyThe type of color.
The only valid value is "solid".
colorstringThe color of the fill.
This must be a valid, six-digit hex code, prefixed with a # symbol.
- Must be six characters long.
- Must start with a
#. - Must use lowercase letters.
Example
"#ff0099"
Represents something that's not supported by the Apps SDK.
typestringRead-onlyThe only valid value is "unsupported".