Kinetic - . , , , , //// , , :
var rect = new Kinetic.Rect({
x: stage.attrs.width/2, y: stage.attrs.height/2,
width: 100, height: 100,
fill: "#eee", stroke: "black", strokeWidth: 1,
offsetX: 0.5,
offsetY: 0.5
});
, :
var layer = new Kinetic.Layer({
offsetX: 0.5,
offsetY: 0.5
});
However, not all things benefit from this trick. Some, in fact, become more crazy. Therefore, be sure to apply displacement at the atomic level itself to avoid contaminating shapes that do not benefit him.
source
share