Get Pixel from Stage - KineticJS
I have the Script:
//Inicializa Canvas con el nombre "Stage"... var stage = new
Kinetic.Stage({ container: 'container', width: 578, height: 200 }); var
layer = new Kinetic.Layer();
var rectX = stage.getWidth() / 2 - 50;
var rectY = stage.getHeight() / 2 - 25;
var box = new Kinetic.Rect({
x: 100,
y: 100,
width: 200,
height: 50,
fill: '#0080C0',
stroke: 'black',
strokeWidth: 4,
draggable: true
});
layer.add(box);
stage.add(layer);
And I need get the Pixel (x/y) 10,20 with KineticJS but I can't use
getImageData because the Canvas of KineticJs haven't ID.
Thanks!
PS: Sorry for my english.
No comments:
Post a Comment