From 1b68bb87c458877cb850a96d8a093d6064bc41dc Mon Sep 17 00:00:00 2001 From: Pushkar Joshi Date: Fri, 2 Mar 2012 12:23:44 -0800 Subject: Catmull-Rom spline sampling for the brush stroke, and options for stroke size, stroke hardness and both stroke colors (left and right --- temporarily using the stroke and fill colors respectively) --- .../brush-properties.reel/brush-properties.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'js/components/tools-properties/brush-properties.reel/brush-properties.js') diff --git a/js/components/tools-properties/brush-properties.reel/brush-properties.js b/js/components/tools-properties/brush-properties.reel/brush-properties.js index 92da98cc..d2fcf888 100755 --- a/js/components/tools-properties/brush-properties.reel/brush-properties.js +++ b/js/components/tools-properties/brush-properties.reel/brush-properties.js @@ -9,17 +9,10 @@ var Component = require("montage/ui/component").Component; var ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties; exports.BrushProperties = Montage.create(ToolProperties, { - - - _subPrepare: { - value: function() { - //this.divElement.addEventListener("click", this, false); - } + strokeSize: { + get: function() { return this._strokeSize; } }, - - handleClick: { - value: function(event) { - // this.selectedElement = event._event.target.id; - } + strokeHardness: { + get: function() { return this._strokeHardness; } } -}); \ No newline at end of file +}); -- cgit v1.2.3 From 703fb3d06e88257ac73c1d1a0ec6ca33a64f4371 Mon Sep 17 00:00:00 2001 From: Pushkar Joshi Date: Wed, 7 Mar 2012 14:33:21 -0800 Subject: implement stroke hardness such that it is percentage of the stroke width that's fully the color of the brush AND add a smoothing flag for the brush options --- .../tools-properties/brush-properties.reel/brush-properties.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'js/components/tools-properties/brush-properties.reel/brush-properties.js') diff --git a/js/components/tools-properties/brush-properties.reel/brush-properties.js b/js/components/tools-properties/brush-properties.reel/brush-properties.js index d2fcf888..0ce685b5 100755 --- a/js/components/tools-properties/brush-properties.reel/brush-properties.js +++ b/js/components/tools-properties/brush-properties.reel/brush-properties.js @@ -14,5 +14,8 @@ exports.BrushProperties = Montage.create(ToolProperties, { }, strokeHardness: { get: function() { return this._strokeHardness; } + }, + doSmoothing:{ + get: function() {return this._doSmoothing; } } }); -- cgit v1.2.3 From fcab2a14f8de302948d38f55db41e2c1c92baa34 Mon Sep 17 00:00:00 2001 From: Pushkar Joshi Date: Thu, 8 Mar 2012 16:03:17 -0800 Subject: brush stroke options for calligraphic brush style --- .../tools-properties/brush-properties.reel/brush-properties.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'js/components/tools-properties/brush-properties.reel/brush-properties.js') diff --git a/js/components/tools-properties/brush-properties.reel/brush-properties.js b/js/components/tools-properties/brush-properties.reel/brush-properties.js index 0ce685b5..e6faa0f0 100755 --- a/js/components/tools-properties/brush-properties.reel/brush-properties.js +++ b/js/components/tools-properties/brush-properties.reel/brush-properties.js @@ -16,6 +16,12 @@ exports.BrushProperties = Montage.create(ToolProperties, { get: function() { return this._strokeHardness; } }, doSmoothing:{ - get: function() {return this._doSmoothing; } + get: function() {return this._doSmoothing.checked; } + }, + useCalligraphic: { + get: function() {return this._useCalligraphic.checked;} + }, + strokeAngle: { + get: function() {return this._strokeAngle;} } }); -- cgit v1.2.3