mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-29 15:19:20 -04:00
Documentation: rearrange @example tags, improve examples, rename boolean -> Boolean and misc smaller edits.
This commit is contained in:
parent
16f521b8a2
commit
17fcb923ff
23 changed files with 727 additions and 481 deletions
src/project
|
@ -65,6 +65,25 @@ var Project = this.Project = Base.extend({
|
|||
*
|
||||
* @type PathStyle
|
||||
* @bean
|
||||
*
|
||||
* @example
|
||||
* project.currentStyle = {
|
||||
* fillColor: 'red',
|
||||
* strokeColor: 'black',
|
||||
* strokeWidth: 5
|
||||
* }
|
||||
*
|
||||
* // The following path 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
|
||||
*
|
||||
* @example
|
||||
* 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)
|
||||
*/
|
||||
getCurrentStyle: function() {
|
||||
return this._currentStyle;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue