PathStyle is used for changing the visual styles of items contained within a Paper.js project and is returned by item.style and project.currentStyle.
All properties of PathStyle are also reflected directly in Item, i.e.: item.fillColor.
To set multiple style properties in one go, you can pass an object to item.style. This is a convenient way to define a style once and apply it to a series of items:
Example
1
2
3
4
5
6
7
8
var circleStyle = {
fillColor: new RgbColor(1, 0, 0),
strokeColor: 'black',
strokeWidth: 5
};
var path = new Path.Circle(new Point(80, 50), 30);
path.style = circleStyle;