canvaskit-wasm 0.39
build 2026-04-29
TileMode
Controls how a shader / image / blur samples beyond its source bounds. Used by gradient shaders (CK.Shader.MakeLinearGradient etc.), Image.makeShaderOptions, and image filters like MakeBlur.
Error: Line 3: Unexpected identifier
The chess sprite is 32 × 16 pixels; rendering it across a 300 × 190 region exposes how each tile mode handles "what's outside the source".
All values
| Value | Behavior outside source bounds |
|---|---|
Clamp | Use the edge pixel — looks like the edge stretches forever. |
Repeat | Tile the source. Most common for patterns. |
Mirror | Tile alternating reflections. No visible seams between tiles. |
Decal | Transparent. Anything outside the source draws nothing — useful for blur to fade rather than smear. |
See also
Image.makeShaderOptions,Shader.MakeLinearGradient.ImageFilter.MakeBlur—Decalis the right choice for most blurs.