Static
createThis returns an HTML Canvas element and is used privately by getSvgTexture
Static
getConstructs a Texture definition for an HTML Canvas Element based Texture
Static
getGets a Texture defintion for a Rounded Rectangle
The Rounded Rectangle is drawn onto an HTML Canvas, and then rendered by Lightning via a Lightning.textures.StaticCanvasTexture
Width of rectangle
Height of rectangle
Corner radius of rectangle
Optional
strokeWidth: numberStroke width of rectangle outline
Optional
strokeColor: numberColor of rectangle outline
Optional
fill: booleantrue
- Fill rectangle with fillColor
, false
- don't fill rectangle
Optional
fillColor: numberColor to fill the rectangle with (if fill
=== true)
Static
getGets a Texture defintion for a Drop-Shadow Rectangle
Width of rectangle
Height of rectangle
Optional
radius: CornerRadiusCorner radius of rectangle
Optional
blur: numberOptional
margin: numberOffset to shift shadow
The Shadow Rectangle is drawn onto an HTML Canvas, and then rendered by Lightning via a Lightning.textures.StaticCanvasTexture
Static
getGets a Texture defintion for an SVG Texture
URL to the SVG file
Width to render the SVG at
Height to render the SVG at
The SVG is downloaded, drawn onto an HTML Canvas, and then rendered by Lightning via a Lightning.textures.StaticCanvasTexture
Useful functions for creating some commonly used textures.