Documentation
Learn all about jCanvasjCanvas
Canvas
- Clear Canvas
- Rotate Canvas
- Scale Canvas
- Translate Canvas
- Pixel Manipulation
- Get Canvas Image
- Draw Manually
- Detect Pixel Ratio
Drawings
Layers
Events
Styles
Shadows
To create a generic shadow, use the shadowColor
and shadowBlur
properties:
$('canvas').drawArc({
fillStyle: '#58d',
shadowColor: '#000',
shadowBlur: 10,
x: 50, y: 50,
radius: 30
});
Offset Position
The shadow can be offset relative to itself using the shadowX
and shadowY
properties:
$('canvas').drawArc({
fillStyle: '#58d',
strokeStyle: '#8e3',
strokeWidth: 4,
shadowColor: '#000',
shadowBlur: 5,
shadowX: -5, shadowY: 5,
x: 50, y: 50,
radius: 30
});