mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 06:00:56 -05:00
Improve Project#currentStyle documentation.
This commit is contained in:
parent
ff55be6efc
commit
7591ccf285
1 changed files with 7 additions and 7 deletions
|
@ -66,24 +66,24 @@ var Project = this.Project = Base.extend({
|
|||
* @type PathStyle
|
||||
* @bean
|
||||
*
|
||||
* @example
|
||||
* @example {@paperscript}
|
||||
* project.currentStyle = {
|
||||
* fillColor: 'red',
|
||||
* strokeColor: 'black',
|
||||
* strokeWidth: 5
|
||||
* }
|
||||
*
|
||||
* // The following path will take over all style properties of
|
||||
* // The following paths will take over all style properties of
|
||||
* // the current style:
|
||||
* var path = new Path.Circle(new Point(50, 50), 30);
|
||||
* console.log(path.strokeWidth); // 5
|
||||
* var path = new Path.Circle(new Point(75, 50), 30);
|
||||
* var path2 = new Path.Circle(new Point(175, 50), 20);
|
||||
*
|
||||
* @example
|
||||
* @example {@paperscript}
|
||||
* project.currentStyle.fillColor = 'red';
|
||||
*
|
||||
* // The following path will take over the fill color we just set:
|
||||
* var path = new Path.Circle(new Point(50, 50), 30);
|
||||
* console.log(path.fillColor); // RGBColor(1, 0, 0)
|
||||
* var path = new Path.Circle(new Point(75, 50), 30);
|
||||
* var path2 = new Path.Circle(new Point(175, 50), 20);
|
||||
*/
|
||||
getCurrentStyle: function() {
|
||||
return this._currentStyle;
|
||||
|
|
Loading…
Reference in a new issue