paperjs/paper.js — pull request #307 by csk157 (2013-10-10 12:44:00+00:00)
Title: Support for patterns

I have added a style called Pattern and wired it to color 'class'. Should work in browsers as well as nodejs.

```javascript
paper.setup(document.getElementById('drawing'););

var bg = new paper.Path.Rectangle({
topLeft: [0,0],
bottomRight: [200, 300],
fillColor: '#EEE'
});
var r = new paper.Path.Rectangle({
topLeft: [0,130],
bottomRight: [200, 300],
fillColor: new paper.Pattern('state.png', 'repeat-y')
});

var circle = new paper.Path.Circle(new paper.Point(100, 70), 50);
circle.fillColor = {pattern: {url: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==', repeat: 'repeat'}}

paper.view.draw();
```

produces:
![screenshot from 2013-10-10 14 39 09](https://f.cloud.github.com/assets/2392131/1306091/23a5da92-31a9-11e3-9621-a3410c21c821.png)

P.S. ternary expressions (short ifs) are very confusing in Color file