mirror of
https://github.com/konvajs/konva.git
synced 2025-05-02 20:05:08 +08:00
21 lines
550 B
JavaScript
21 lines
550 B
JavaScript
Test.Modules.ELLISPE = {
|
|
'add ellipse': function(containerId) {
|
|
var stage = new Kinetic.Stage({
|
|
container: containerId,
|
|
width: 578,
|
|
height: 200
|
|
});
|
|
var layer = new Kinetic.Layer();
|
|
var circle = new Kinetic.Ellipse({
|
|
x: stage.getWidth() / 2,
|
|
y: stage.getHeight() / 2,
|
|
radius: [70, 35],
|
|
fill: 'green',
|
|
stroke: 'black',
|
|
strokeWidth: 8
|
|
});
|
|
layer.add(circle);
|
|
stage.add(layer);
|
|
}
|
|
};
|