35 Commits

Author SHA1 Message Date
ef5c949d85 Add stub method for isPointInStroke 2025-03-09 13:00:07 +02:00
89b592c6ac remove non-scaling stroke 2025-03-09 12:04:04 +02:00
k1w1
2e5bd80cdb Add hack to prevent incorrectly scaled stroke 2024-04-18 17:02:55 -07:00
k1w1
a891b0ad58 Support addPath properly.
However this is not correctly handling the transform. To do it correctly we need to store the sub-paths in the path in their original form (not a string) and apply the transforms at render time.
2024-04-18 13:26:13 -07:00
k1w1
130fe48f8e Added roundRect support 2023-12-22 19:54:13 -08:00
k1w1
7fe0aeaaea Force all images to be inline bitmaps.
Otherwise the SVGs we generate can't be opened by editing tools like Figma.
2022-12-29 15:30:59 -08:00
k1w1
4f7bcfec4c Fixed clipping behavior and handling of save/restore around stroke and fill. 2022-12-24 14:49:29 -08:00
k1w1
f43ff8ba15 Apply transform to paths 2022-09-05 12:35:47 -07:00
k1w1
7f59355b0a Support independent paths 2022-08-22 16:53:26 -07:00
Chris Waters
67d5dfd52e
Merge pull request #4 from aha-app/issue-scale-lineWidth
Apply to scale to lineWidth.
2022-07-17 20:14:35 -07:00
Chris Waters
f09378a7a9
Merge pull request #3 from aha-app/issue-ellipse-translate-problem
Issue ellipse translate problem
2022-07-17 20:13:57 -07:00
k1w1
87d8a34ed6 Apply to scale to lineWidth.
This will only work if scaling is proportional, i.e. X and Y axes are scaled the same.
2022-07-17 11:08:10 -07:00
k1w1
6e7449a639 Fixed problem when rotation is applied 2022-07-17 09:55:39 -07:00
k1w1
c64d8283d4 Fix a problem with ellipse drawing if at translation is applied. 2022-07-17 09:06:40 -07:00
Chris Waters
95702efae3
Merge pull request #2 from aha-app/issue-arc-scaling
Fix rendering of arcTo when a scale is applied
2022-07-15 17:58:53 -07:00
k1w1
6c209fccdf Add support for ellipses 2022-07-15 17:47:47 -07:00
k1w1
f4b7ece357 Add ellipse function
Based on code in this PR https://github.com/gliffy/canvas2svg/pull/36
2022-07-14 20:36:39 -07:00
k1w1
e8f9ca5f35 Fix rendering of arcTo when a scale is applied 2022-07-14 20:09:24 -07:00
Zeno Zeng
3573673b60
Merge pull request #11 from Validark/main
Use browser's built-in font parser
2022-03-09 23:00:52 +08:00
Validark
8a221b2d6f Use browser's built-in font parser 2022-03-07 06:33:37 -07:00
Validark
d7e5bd071d
Update Regular Expression to handle decimal values
From https://github.com/gliffy/canvas2svg/issues/85
2022-03-07 06:06:44 -06:00
Zeno Zeng
3991b8ee96 feat: Context.prototype.getImageData (experimental), for https://github.com/gliffy/canvas2svg/issues/3, for https://github.com/zenozeng/p5.js-svg/issues/203 2022-02-04 13:50:27 +08:00
Zeno Zeng
5afaf230b7 bump version to 2.1.0 2022-02-04 10:42:43 +08:00
Zeno Zeng
35b9c08c5f refactor 2022-02-04 10:05:16 +08:00
Zeno Zeng
bc805cfb63 fix typo & rollup 2.67.0 2022-02-03 12:12:35 +08:00
Zeno Zeng
f65d64aa53 utils.toString for https://github.com/zenozeng/p5.js-svg/issues/204 2022-02-03 12:05:24 +08:00
Xavier Delamotte
f8d0aa06c0 Fix adding CanvasPattern
The current code was going into an infinite loop
It's also setting `patternUnits` to `userSpaceOnUse` in order to get the same behaviour as canvas patterns
2021-11-10 16:48:00 +00:00
Zeno Zeng
6c2f72d30a fix: push/pop transformMatrixStack when save/restore, for https://github.com/zenozeng/p5.js-svg/issues/191 2021-07-07 00:07:55 +08:00
Zeno Zeng
3e7435eec8 feat: sync element's width and height to context 2021-06-14 21:45:27 +08:00
Zeno Zeng
b6ef900d21 chore: esm 2021-06-10 19:36:00 +08:00
Zeno Zeng
c60ed4e64b bump version to 2.0.1 2021-06-06 15:46:13 +08:00
Zeno Zeng
4b21c73183 bump version to 2.0.0 2021-06-06 14:21:35 +08:00
Zeno Zeng
3d96ae9391 fix: recreate root <g> when __clearCanvas to remove all attributes 2021-06-06 01:30:40 +08:00
Zeno Zeng
bcdc8df943 feat: clearCanvas in fillRect 2021-06-05 23:22:57 +08:00
Zeno Zeng
802d0614ce feat: element api 2021-06-05 15:56:16 +08:00