Commit Graph

216 Commits (81ff41f8816c79b3c21f6990d0aebadd5cc55138)

Author SHA1 Message Date
Andy ccc9ee6ae1 added clipping to work around floating point error in Arc._parameterize() 2018-07-24 15:07:02 -07:00
Andy b47345da91 added clipping to work around floating point error in Arc._parameterize() 2018-07-24 14:57:54 -07:00
Andy be946b8d92 removed 2018-07-24 14:35:39 -07:00
Andy 2b1670460e removed build & eggs-info from git repo 2018-07-24 14:34:28 -07:00
Andy 7fc7e45113 fixed false error raised when scipy not installed 2018-07-09 21:40:00 -04:00
Andy 8d5023939e updated for new PyPI release 2018-07-06 23:04:23 -04:00
Andy fb916596e2 fixed scale 2018-07-06 23:00:25 -04:00
Andy fd521748fa fixed scaled (before cleanup) 2018-07-06 22:59:28 -04:00
Andy 2cb56c50c5 added .travis.yml 2018-06-10 14:57:24 -07:00
Andy 31a8d2ac11 rgb2hex now allows lists as input 2018-06-10 14:41:27 -07:00
Andy 850055fa57 fixed bez2poly function 2018-06-10 14:38:08 -07:00
Andy a2ea4a0e80 fixed path curvature 2018-06-10 14:33:17 -07:00
Andy fd95b5609f partially fixed scale fcn and improved tests 2018-06-08 22:13:18 -07:00
mdejean f932036fb5 After Z, next subpath starts at same position (#53)
* After Z, next subpath starts at same position

Fixes #52

* removed old comment to mirror new behavior
2018-06-02 00:49:49 -07:00
Andy Port 18b1337877 renamed svg2paths module to allow imports 2018-06-02 00:32:16 -07:00
Andy Port 55661d18a4
Merge pull request #54 from playi/scale
add scale() for curves, and scaled() for paths
2018-05-30 21:20:22 -07:00
Andy Port 304c0bbe1d
improved `scale` related tests 2018-05-30 19:30:24 -07:00
Andy Port 72d7467896
implemented (almost) full SVG scale transform functionality 2018-05-30 19:07:58 -07:00
Orion Elenzil ee656c7de0 refactor `scale()` and `scaled()` to `scale_uniform()` and `scaled_uniform()` 2018-05-30 10:54:56 -07:00
Andy Port 6fcc71d63b minor docstring improvements 2018-05-28 19:46:38 -07:00
Andy Port 6da601f8a7
Merge pull request #56 from DmitryMilk/polyline-adjust-to-specification
Polyline/polygon parsing adjusted to specification
2018-05-28 18:50:12 -07:00
Dmitry_Milk 321e097a4e polygon/polyline parsing tests added 2018-05-27 12:34:12 +03:00
Dmitry_Milk 2dcfa88cf2 Adjust polyline/polygon parsing to W3C specification
https://www.w3.org/TR/SVG11/shapes.html#PointsBNF
2018-05-27 11:47:44 +03:00
Andy Port 0827206953
style changes 2018-05-22 19:59:03 -07:00
Andy Port eafe3682b9
altered so lines aren't (much) over 79 characters
Note: this is mostly unrelated to changes requested by @playi
2018-05-22 19:34:56 -07:00
Andy Port 6394415108
minor aesthetic change 2018-05-22 19:22:09 -07:00
Orion Elenzil 1ba9d45b35 unit test for new scale() and scaled() path transformation. tests all current segment types, composite paths, etc 2018-05-22 15:48:45 -07:00
Orion Elenzil d21a66aff0 add scale() for curves, and scaled() for paths 2018-05-22 12:45:04 -07:00
Andy Port 71b4403375
fix typo `joins_smoothl_with` 2018-04-13 14:34:28 -07:00
Andy Port 29a49197a7
Merge pull request #42 from SebKuzminsky/line-line-intersect
Fix Line.intersect(Line) (bug #41)
2018-02-27 22:38:33 -08:00
Andy Port a50c522f86
use np.close to check to check for vanishing denom
Just to offer users some amount of control over the tolerance.
2018-02-27 22:38:01 -08:00
Sebastian Kuzminsky 89d9acf06e Line.intersect(Line): fix a "miss some intersections" bug
Negative numbers are allowed in the denominator, what we really want to
avoid is near-zero denominators.
2018-01-20 20:46:54 -07:00
Sebastian Kuzminsky cc4573ffc7 add a failing Line.intersect(Line) test
I introduced this bug recently, sorry!  The bug is fixed in the following
commit.
2018-01-20 20:45:47 -07:00
Sebastian Kuzminsky de600f9b91 rename test to make room for more 2018-01-20 20:36:06 -07:00
Sebastian Kuzminsky fc34d2c4cf deal with float rounding error in Line.intersect(Line)
This commit fixes #41.

In the test case added in the previous commit, two non-intersecting lines
are very nearly collinear, but float rounding errors lead to incorrect
intersections reported.

This commit makes Line.intersect() treat denominators below 1e-9 as 0,
to make it more accepting of float rounding.
2018-01-06 23:15:43 -07:00
Sebastian Kuzminsky 847b270bc2 add a failing Line.intersect(Line) test
These two lines are parallel but do not intersect.  Line.intersect()
finds an incorrect intersection.
2018-01-06 23:05:55 -07:00
Andy bf95944c49 moved test for checking if `Arc()` throws `acos` domain error due to numerical error 2017-12-26 00:57:48 -05:00
Andy Port 50d7db0352
Merge pull request #31 from andersgb/acos-roundoff-fix
Arc parsing round-off fix
2017-12-25 23:55:26 -05:00
Andy Port c32c7a627b
Merge pull request #34 from SebKuzminsky/fixup-offset-example
README: fix a type error in Offseting Paths example
2017-12-23 02:51:50 -08:00
Sebastian Kuzminsky 2a456b168d README: remove dead code from Offsetting Paths example 2017-12-18 08:22:40 -07:00
Sebastian Kuzminsky 8c93eb0f2f README: fix a type error in Offseting Paths example
Before this commit the `t = k / steps` math is done with integers,
which always results in `t = 0`.

This commit forces the math to be done with floating-point numbers,
which results in the progression of `t` values we want.
2017-12-18 00:07:26 -07:00
Andy b54bf778b4 changed version number in preparation for PyPI update 2017-11-27 15:27:25 -08:00
Andy Port 1f074d5adc
changed setup to auto-install svgwrite + numpy 2017-11-27 15:17:29 -08:00
Anders Granskogen Bjørnstad ec63d0c312 Arc: Handle round-off issue with acos()
math.acos raises outside of valid range [-1, 1]. Handle round-off errors
gracefully by using `round()` here too.
2017-11-10 13:44:24 +01:00
Anders Granskogen Bjørnstad 316dc8bfe9 test_parsing.py: Add test_roundoff example
This test currently fails due to math.acos(1.0000000000001) raising a
ValueError.
2017-11-10 13:43:39 +01:00
Andy Port 5d65d575b5 Merge pull request #25 from mathandy/svgwrite-debug-false-by-default
now disvg and wsvg pass `debug=False` into svgwrite.Drawing() by default
2017-07-22 15:04:56 -07:00
Andy 586bccd0f2 now svgwrite debug is false by default 2017-07-18 20:01:37 -07:00
Andy Port f9229ca9bf minor change 2017-07-18 18:36:36 -07:00
Andy 5b1d0dc9cd added CONTRIBUTION.md -- guidelines for contributors 2017-07-18 18:33:00 -07:00
Andy e8367d463a added svg (planning to make unittest in future)
TODO: create unittest for rect element support
2017-04-26 02:21:43 -07:00