updated docs

This commit is contained in:
Eric Rowell
2013-01-30 10:05:58 -08:00
parent 322e88d454
commit 582ed89a02
2 changed files with 25 additions and 0 deletions

View File

@@ -15,6 +15,7 @@
* @param {Number} [config.fillRadialGradientEndRadius]
* @param {Array} [config.fillRadialGradientColorStops] array of color stops
* @param {Boolean} [config.fillEnabled] flag which enables or disables the fill. The default value is true
* @param {String} [config.fillPriority] can be color, linear-gradient, radial-graident, or pattern. The default value is color. The fillPriority property makes it really easy to toggle between different fill types. For example, if you want to toggle between a fill color style and a fill pattern style, simply set the fill property and the fillPattern properties, and then use setFillPriority('color') to render the shape with a color fill, or use setFillPriority('pattern') to render the shape with the pattern fill configuration
* @param {String} [config.stroke] stroke color
* @param {Number} [config.strokeWidth] stroke width
* @param {Boolean} [config.strokeEnabled] flag which enables or disables the stroke. The default value is true

View File

@@ -102,27 +102,51 @@
var p = hitCanvas.context.getImageData(Math.round(pos.x), Math.round(pos.y), 1, 1).data;
return p[3] > 0;
},
/**
* enable fill
*/
enableFill: function() {
this.setAttr('fillEnabled', true);
},
/**
* disable fill
*/
disableFill: function() {
this.setAttr('fillEnabled', false);
},
/**
* enable stroke
*/
enableStroke: function() {
this.setAttr('strokeEnabled', true);
},
/**
* disable stroke
*/
disableStroke: function() {
this.setAttr('strokeEnabled', false);
},
/**
* enable shadow
*/
enableShadow: function() {
this.setAttr('shadowEnabled', true);
},
/**
* disable shadow
*/
disableShadow: function() {
this.setAttr('shadowEnabled', false);
},
/**
* enable dash array
*/
enableDashArray: function() {
this.setAttr('dashArrayEnabled', true);
},
/**
* disable dash array
*/
disableDashArray: function() {
this.setAttr('dashArrayEnabled', false);
},