【发布时间】:2014-04-19 20:54:18
【问题描述】:
我尝试使用 Kineticjs 形状的 fillAlpha() 函数,但它不会改变填充颜色的 alpha。
这就是我所做的:
var stage = new Kinetic.Stage({
container: 'container',
width: 578,
height: 200
});
var layer = new Kinetic.Layer();
var circle = new Kinetic.Circle({
x: stage.getWidth() / 2,
y: stage.getHeight() / 2,
radius: 70,
fill: 'red',
stroke: 'black',
strokeWidth: 4
});
circle.fillAlpha(0.5);
// add the shape to the layer
layer.add(circle);
// add the layer to the stage
stage.add(layer);
circle.fillAlpha(0.5);对填充没有影响。
这是一个用于演示的 JsFiddle:http://jsfiddle.net/VKNLM/
如何更改填充颜色的 alpha?
【问题讨论】:
标签: javascript html canvas kineticjs