Styles Shadows 阴影 - caleb531/jcanvas-docs GitHub Wiki
Shadows 阴影
To create a generic shadow, use the shadowColor
and shadowBlur
properties:
要创建一个通用的阴影,要使用shadowColor
和shadowBlur
属性
$('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:
阴影可以使用shadowX
和shadowY
属性来相对于它本身偏移。
$('canvas').drawArc({
fillStyle: '#58d',
strokeStyle: '#8e3',
strokeWidth: 4,
shadowColor: '#000',
shadowBlur: 5,
shadowX: -5, shadowY: 5,
x: 50, y: 50,
radius: 30
});