aboutsummaryrefslogtreecommitdiff
path: root/js/tools/PenTool.js
diff options
context:
space:
mode:
authorPushkar Joshi2012-03-15 14:33:48 -0700
committerPushkar Joshi2012-03-15 14:33:48 -0700
commite574f722864a246bad40d3f5a4e59f7ccb206ea9 (patch)
treebaad38aa8440b7e929005acc058ca07bcc21bf5a /js/tools/PenTool.js
parent571ed9ef856780eded3ac7104ed0ce72c7c7c81c (diff)
downloadninja-e574f722864a246bad40d3f5a4e59f7ccb206ea9.tar.gz
update values in the PI from values of the selected brush stroke or pen tool path
Diffstat (limited to 'js/tools/PenTool.js')
-rwxr-xr-xjs/tools/PenTool.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/js/tools/PenTool.js b/js/tools/PenTool.js
index e239b3f1..779b7f16 100755
--- a/js/tools/PenTool.js
+++ b/js/tools/PenTool.js
@@ -467,9 +467,9 @@ exports.PenTool = Montage.create(ShapeTool, {
467 if (this.application.ninja.colorController.colorToolbar.stroke.webGlColor){ 467 if (this.application.ninja.colorController.colorToolbar.stroke.webGlColor){
468 this._selectedSubpath.setStrokeColor(this.application.ninja.colorController.colorToolbar.stroke.webGlColor); 468 this._selectedSubpath.setStrokeColor(this.application.ninja.colorController.colorToolbar.stroke.webGlColor);
469 } 469 }
470 //if (this.application.ninja.colorController.colorToolbar.fill.webGlColor){ 470 if (this.application.ninja.colorController.colorToolbar.fill.webGlColor){
471 // this._selectedSubpath.setFillColor(this.application.ninja.colorController.colorToolbar.fill.webGlColor); 471 this._selectedSubpath.setFillColor(this.application.ninja.colorController.colorToolbar.fill.webGlColor);
472 //} 472 }
473 } //if this is a new path being rendered 473 } //if this is a new path being rendered
474 474
475 this._selectedSubpath.makeDirty(); 475 this._selectedSubpath.makeDirty();
@@ -594,6 +594,7 @@ exports.PenTool = Montage.create(ShapeTool, {
594 594
595 var subpath = this._selectedSubpath; //new GLSubpath(); 595 var subpath = this._selectedSubpath; //new GLSubpath();
596 subpath.setWorld(world); 596 subpath.setWorld(world);
597 subpath.setCanvas(newCanvas);
597 subpath.setPlaneMatrix(planeMat); 598 subpath.setPlaneMatrix(planeMat);
598 var planeMatInv = glmat4.inverse( planeMat, [] ); 599 var planeMatInv = glmat4.inverse( planeMat, [] );
599 subpath.setPlaneMatrixInverse(planeMatInv); 600 subpath.setPlaneMatrixInverse(planeMatInv);
@@ -614,7 +615,7 @@ exports.PenTool = Montage.create(ShapeTool, {
614 if(strokeColor) { 615 if(strokeColor) {
615 newCanvas.elementModel.shapeModel.border = this.application.ninja.colorController.colorToolbar.stroke; 616 newCanvas.elementModel.shapeModel.border = this.application.ninja.colorController.colorToolbar.stroke;
616 } 617 }
617 newCanvas.elementModel.shapeModel.strokeMaterial = this._selectedBrushStroke.getStrokeMaterial(); 618 newCanvas.elementModel.shapeModel.strokeMaterial = subpath.getStrokeMaterial();
618 619
619 newCanvas.elementModel.shapeModel.GLGeomObj = subpath; 620 newCanvas.elementModel.shapeModel.GLGeomObj = subpath;
620 newCanvas.elementModel.shapeModel.useWebGl = this.options.use3D; 621 newCanvas.elementModel.shapeModel.useWebGl = this.options.use3D;