ImageBackground
final class ImageBackground (View source)
Defines the pixels used where a source image does not cover its variant canvas.
A transparent background deliberately has no color value. A color background always exposes one normalized opaque RGB value.
Methods
Creates a background whose unused canvas pixels retain alpha transparency.
Creates an opaque RGB background from an exact hexadecimal color value.
Returns the policy that determines how unused canvas pixels are initialized.
Returns the normalized color for color mode, or null when the background is transparent.
Returns the stable output-affecting representation used by variant cache identity.
Details
transparent
static ImageBackground
transparent()
Creates a background whose unused canvas pixels retain alpha transparency.
color
static ImageBackground
color(string $color)
Creates an opaque RGB background from an exact hexadecimal color value.
mode
ImageBackgroundMode
mode()
Returns the policy that determines how unused canvas pixels are initialized.
colorValue
string|null
colorValue()
Returns the normalized color for color mode, or null when the background is transparent.
canonical
string
canonical()
Returns the stable output-affecting representation used by variant cache identity.