183 Commits

Author SHA1 Message Date
fuzhen
d70b13eedd add tests for globalAlpha 2016-01-16 17:22:47 +08:00
fuzhen
f302a60389 fixed duplicate def of globalAlpha in STYLES 2016-01-06 23:58:17 +08:00
fuzhen
efcdc56ccd fixed a bug with globalAlpha 2016-01-06 23:27:49 +08:00
Gabriel Hernandez
093bedd087 Merge pull request #38 from FuZhenn/master
Fix drawImage and add new __clearCanvas
2016-01-05 12:41:24 -08:00
fuzhen
9dc92b79aa 1. move back to image.getAttribute("src")
2. save the original transform of C2S context in drawImage
2015-12-18 09:59:13 +08:00
fuzhen
ef3ab241e6 reset stacks when clearing canvas 2015-12-17 12:52:13 +08:00
fuzhen
170b8c574d 1. clear entire canvas when clearRect(0,0, canvas.width, canvas.height), this removes unnecessary white rects generated by clearRect when clearing canvas.
2. clone child SVG node at first before drawImage(c2s, x, y) to prevent unwanted updates by parent C2S context.
2015-12-17 02:12:48 +08:00
fuzhen
d2e840c077 fix a bug that image is not translated to (dx, dy) when ctx.drawImage(img, dx, dy) 2015-12-17 01:20:29 +08:00
fuzhen
14e37d734c replace image.getAttribute("src") with image.src. 2015-12-16 13:19:05 +08:00
Gabriel Hernandez
b624e26d18 Merge pull request #35 from FuZhenn/master
empty context and setDashLine
2015-12-14 08:38:38 -08:00
fuzhen
c29f752612 add example of setLineDash 2015-11-27 12:58:41 +08:00
Fu Zhen
9ee9cc2e6c implements setLineDash
implements canvas.setLineDash
2015-11-27 03:34:03 +08:00
Fu Zhen
1e101b54a9 setLineDash
an additional not implemented method: setLineDash.
2015-11-26 22:44:33 +08:00
Fu Zhen
73735519b1 Merge pull request #1 from FuZhenn/Fuzhenn-fix-draw-empty-ctx
when drawImage a empty C2S context
2015-11-26 22:32:06 +08:00
Fu Zhen
8a8d081561 when drawImage a empty C2S context
Null pointer error will be thrown when ctx.drawImage(ctx) with an empty C2S context with no childNodes.

These code may fix the problem.
2015-11-26 22:31:35 +08:00
Gabriel Hernandez
ec6e29af6c v1.0.16 2015-09-09 12:15:32 -07:00
Gabriel Hernandez
967b515663 Merge pull request #30 from ConradIrwin/fix-empty-circles
Don't draw invisible circles
2015-09-09 12:09:12 -07:00
Gabriel Hernandez
92bed4b9d6 Merge pull request #31 from ConradIrwin/commonjs
Make canvas2svg work with commonjs and jsdom
2015-09-09 12:05:36 -07:00
Conrad Irwin
363cc72ebf Add gulp bump 2015-09-09 11:05:11 -07:00
Conrad Irwin
4aa7a90586 +bower.json 2015-09-09 10:59:13 -07:00
Conrad Irwin
273fd09ca7 document using with node.js 2015-09-09 00:37:10 -07:00
Conrad Irwin
c1cb3c284e Add a test for using a custom document 2015-09-09 00:29:04 -07:00
Conrad Irwin
2a8c062588 Add a test for empty arcs 2015-09-09 00:19:54 -07:00
Conrad Irwin
39e081b711 Make canvas2svg work with jsdom 2015-09-05 15:50:20 -07:00
Conrad Irwin
d3b5e999c8 export as a common js module
Useful for people wanting to use browserify/webpack
2015-09-05 14:11:49 -07:00
Conrad Irwin
8d5249760a Don't draw invisible circles 2015-09-05 00:03:43 -07:00
clintjd
bb2aac32e0 Update canvas2svg.js 2015-06-18 17:11:13 -07:00
clintjd
e356e21d80 updated image url to build and added 1.0.15 info 2015-06-18 17:07:08 -07:00
clintjd
ff0fcb3f00 Merge pull request #28 from gwwar/master
Setup travis, add testharness and debug playground, and fix regression for __createElement refactor
2015-06-18 17:02:18 -07:00
kerryliu
92ea35cc87 port unit tests to mocha and chai, add img diff example tests, add debug playground, setup travis 2015-06-16 19:16:12 -07:00
clintjd
715ce44acd bumped version to 1.0.13 2015-06-16 15:13:33 -07:00
clintjd
a90669c32b bumped version to 1.0.13
set paint order before stroke and fill to make them behavior like canvas
2015-06-16 15:13:16 -07:00
clintjd
9ed0b82b57 Merge pull request #26 from zenozeng/paint-order
set paint order before stroke and fill to make them behavior like canvas
2015-06-16 15:11:33 -07:00
clintjd
a6b9563c9c Update canvas2svg.js 2015-06-16 15:08:34 -07:00
clintjd
7a2a4fcaaa Update README.md 2015-06-16 15:08:17 -07:00
clintjd
5d82d36034 Merge pull request #25 from zenozeng/ctx.arcTo
implementation of ctx.prototype.arcTo
2015-06-16 15:07:21 -07:00
clintjd
ce3e19f7f7 Update canvas2svg.js 2015-06-15 17:26:54 -07:00
clintjd
3a04092920 Update README.md 2015-06-15 17:26:31 -07:00
clintjd
b55d2b10b5 Merge pull request #24 from zenozeng/master
call lineTo instead moveTo in ctx.arc, fixes closePath issue and straight line issue
2015-06-15 16:55:14 -07:00
Zeno Zeng
36dc5f3cd3 set paint order before stroke and fill to make them behavior like canvas 2015-06-10 15:19:57 +08:00
Zeno Zeng
97f65bc9e7 implementation of ctx.prototype.arcTo 2015-06-08 17:59:28 +08:00
Zeno Zeng
b7223338f9 call lineTo instead moveTo in ctx.arc 2015-06-08 17:37:46 +08:00
clintjd
66f9cef410 bumped version to 1.0.10 2015-06-02 11:11:36 -07:00
clintjd
5de71a7840 bumped version to 1.0.10 2015-06-02 11:10:42 -07:00
clintjd
32b567c325 Merge pull request #22 from zenozeng/lineto-pr
when lineTo called, use M instead of L unless subpath exists
2015-06-02 11:09:42 -07:00
Zeno Zeng
f5b2692a88 when lineTo called, use M instead of L unless subpath exists 2015-05-30 08:54:10 +08:00
clintjd
a186bb9a95 bumped version to 1.0.9 2015-05-29 10:26:44 -07:00
clintjd
4bb5ac4d6f bumped version to 1.0.9 2015-05-29 10:25:53 -07:00
clintjd
bc53ac50ef Merge pull request #20 from zenozeng/master
use currentDefaultPath instead of <path>'s d attribute, fixes stroke's different behavior in SVG and canvas.
2015-05-29 10:24:43 -07:00
Zeno Zeng
696568b1a9 use currentDefaultPath instead of <path>'s d attribute, fixes stroke's different behavior in SVG and canvas. 2015-05-23 23:21:59 +08:00