有人能给我解释一下吗?vardiagramImage=newKinetic.Shape(function(){varcontext=this.getContext();context.beginPath();context.lineWidth=1;//Thisiscrazytricks.It'spartoftheKineticJSdemowebsite,buthowamIabletoassigndiagramImage.colorhere?context.strokeStyle=diagramImage.color;varlastVertice=polygon.Vertices[pol
我有一blockCanvas,可以容纳中等到大量的形状(50-500)。我已经成功地使用这些工具绘制了我想要的形状的轮廓:functionDrawPolygon(diagramLayer,polygon){vardiagramImage=newKinetic.Shape(function(){varcontext=this.getContext();context.beginPath();context.lineWidth=1;context.strokeStyle="#ff0000";varlastVertice=polygon.Vertices[polygon.Vertices.l
我有一blockCanvas,可以容纳中等到大量的形状(50-500)。我已经成功地使用这些工具绘制了我想要的形状的轮廓:functionDrawPolygon(diagramLayer,polygon){vardiagramImage=newKinetic.Shape(function(){varcontext=this.getContext();context.beginPath();context.lineWidth=1;context.strokeStyle="#ff0000";varlastVertice=polygon.Vertices[polygon.Vertices.l