From 2a87a750f06003fc62e8e0e73983e14ce24fc7a7 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 17 Apr 2012 10:19:20 -0700 Subject: IKNinja-1477 - Cannot preflight Fill color if WebGL Line shape is selected. Signed-off-by: Nivesh Rajbhandari --- js/lib/geom/brush-stroke.js | 3 +++ js/lib/geom/geom-obj.js | 3 +++ js/lib/geom/line.js | 2 ++ 3 files changed, 8 insertions(+) (limited to 'js/lib') diff --git a/js/lib/geom/brush-stroke.js b/js/lib/geom/brush-stroke.js index 26ac42e9..743dab85 100755 --- a/js/lib/geom/brush-stroke.js +++ b/js/lib/geom/brush-stroke.js @@ -44,6 +44,9 @@ var BrushStroke = function GLBrushStroke() { this._strokeAngle = 0; this._strokeAmountSmoothing = 0; + // currently, brush does not support a fill region + this.canFill = false; + //threshold that tells us whether two samples are too far apart this._MAX_SAMPLE_DISTANCE_THRESHOLD = 5; diff --git a/js/lib/geom/geom-obj.js b/js/lib/geom/geom-obj.js index 2cde8a75..f2991bdb 100755 --- a/js/lib/geom/geom-obj.js +++ b/js/lib/geom/geom-obj.js @@ -47,6 +47,9 @@ var GeomObj = function GLGeomObj() { this._fillMaterial = null; this._strokeMaterial = null; + // Shapes (such as lines) that don't support fill should set this to false + this.canFill = true; + // array of primitives - used in RDGE this._primArray = []; this._materialNodeArray = []; diff --git a/js/lib/geom/line.js b/js/lib/geom/line.js index 8ee39098..bb198d83 100755 --- a/js/lib/geom/line.js +++ b/js/lib/geom/line.js @@ -33,6 +33,8 @@ var Line = function GLLine( world, xOffset, yOffset, width, height, slope, strok this._scaleX = 1.0; this._scaleY = 1.0; + this.canFill = false; + if (arguments.length > 0) { this._width = width; this._height = height; -- cgit v1.2.3