Skip to content

Commit a96a9db

Browse files
committed
First commit, parity with Easel 0.6.0
0 parents  commit a96a9db

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+23864
-0
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

Diff for: HISTORY.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
0.1.0 / 2013-02-14
2+
==================
3+
4+
* Initial Release. Parity with EaselJS 0.6.0.

Diff for: LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2013 Wes Gorgichuk
2+
3+
Permission is hereby granted, free of charge, to any person
4+
obtaining a copy of this software and associated documentation
5+
files (the "Software"), to deal in the Software without
6+
restriction, including without limitation the rights to use,
7+
copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the
9+
Software is furnished to do so, subject to the following
10+
conditions:
11+
12+
The above copyright notice and this permission notice shall be
13+
included in all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22+
OTHER DEALINGS IN THE SOFTWARE.

Diff for: README.md

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# node-easel
2+
3+
node-easel is a node wrapper for [EaselJS](https://github.com/CreateJS/EaselJS).
4+
For use with [NodeJS](http://nodejs.org), built on-top of [node-canvas](https://github.com/LearnBoost/node-canvas)
5+
6+
## Installation
7+
8+
$ npm install node-easel
9+
10+
**Note**
11+
Cairo graphics is required to run node-easel && node-canvas.
12+
Read the install docs at https://github.com/LearnBoost/node-canvas, for full install instructions.
13+
14+
## Examples
15+
16+
To see a full working demo, checkout the [examples](examples/) folder.
17+
18+
19+
## Simple Example
20+
21+
node-easel is completely polymorphic with EaselJS. A good starting point is to checkout the [EaselJS documentation](http://createjs.com/Docs/EaselJS/).
22+
23+
```javascript
24+
//Import easel
25+
require('node-easel');
26+
var Stage = createjs.Stage;
27+
var Shape = createjs.Shape;
28+
var Graphics = createjs.Graphics;
29+
30+
var fs = require('fs');
31+
32+
//Create the canvas to draw to
33+
var c = new Canvas(980, 580);
34+
var ctx = c.getContext('2d');
35+
36+
//Create graphics object
37+
var g = new createjs.Graphics();
38+
var shape = new createjs.Shape(g);
39+
40+
//Draw a circle
41+
g.setStrokeStyle(8)
42+
.beginStroke("#F0F")
43+
.beginRadialGradientFill(["#FF0","#00F"],[0,1],100,200,0,100,200,40)
44+
.drawCircle(100,200,40);
45+
46+
//Add the item to our stage, and call .tick(); to draw the object.
47+
var stage = new createjs.Stage(c);
48+
stage.addChid(shape);
49+
stage.tick();
50+
51+
//Create a PNG file
52+
fs.writeFile(__dirname + '/public/circle.png', c.toBuffer());
53+
```

Diff for: docs/Install node-canvas.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# node-canvas install (for Ubuntu Server 10.04)
2+
3+
If not already installed, install Node (tested on v0.8.18)
4+
5+
Either:
6+
7+
```sudo apt-get install node```
8+
9+
or manually install
10+
11+
# Install dependancies first
12+
```sudo apt-get install libssl-dev pkg-config```
13+
14+
```wget https://github.com/joyent/node/archive/v0.8.18.tar.gz
15+
tar -zxvf v0.8.18
16+
cd joyent-node-xxxxx/
17+
./configure
18+
make
19+
sudo make install
20+
```
21+
## Install Cairo
22+
23+
#### Image support (Required)
24+
```sudo apt-get install binutils-dev librsvg2-dev```
25+
#### PDF support (Optional)
26+
```sudo apt-get install libopenjpeg-dev libpoppler13 libpoppler-dev```
27+
#### If you can't install libjpeg8-dev or libpoppler13, add these sources to /etc/apt/sources.list
28+
```deb http://ftp.ca.debian.org/debian stable main
29+
deb-src http://ftp.ca.debian.org/debian stable main```
30+
31+
#### Now install Cairo (on Ubuntu 11)
32+
```sudo apt-get install libcairo2-dev libjpeg8-dev```
33+
34+
#### For ubunutu 10.04 manually install
35+
```wget http://cairographics.org/snapshots/pixman-0.25.6.tar.gz
36+
tar -zxvf pixman-0.25.6.tar.gz
37+
cd pixman-0.25.6
38+
./configure
39+
make
40+
sudo make install
41+
42+
wget http://cairographics.org/snapshots/cairo-1.11.4.tar.gz
43+
tar -xvzf cairo-1.11.4.tar.gz
44+
cd cairo-1.11.4
45+
./configure
46+
make
47+
sudo make install```
48+
49+
## Finally Install Canvas
50+
npm install canvas

0 commit comments

Comments
 (0)