Skip to content

Releases: meerk40t/svgelements

Bug Fixes

02 Nov 14:56
8f3d57d
Compare
Choose a tag to compare
  • Coord values without points raise ValueErrors. Path("sn") will throw an error rather than create a faulty object.
  • Various dunder methods will return NotImplemented explicitly.
  • Adding a Path with something that cannot add be added to it, will register a TypeError rather than recurse an infinite loop.
  • Reify performed on a shape with a stroke width will be scaled up by a factor of the sqrt(abs(det)) of the matrix.
  • Validate Subpaths will not be applied to position -1 as could happen in Path.extend() on an empty path.
  • scale values for round shapes during reification is done as the absolute value. This is to correct the inverted sweep issue.
  • Roundshapes have an added _ramanujan_length value.
  • Subpaths now accept slices as part of getitem.
  • svg_structure_parse now parses event start-ns and saves the namespaces used in the values dict.
  • Default colors for fill are "black" and stroke is "none" rather than automatically setting them to the currentcolor, these values match the svg spec.

Relative and Smooth Preservation.

20 Jul 09:46
2da7098
Compare
Choose a tag to compare

Preserves Relative and Smooth values as initially set in the path. These can be overridden by setting relative=True, relative=False, smooth=True, smooth=False.

Rebuilt the core SVG path parser. This was required to pass W3C Path17 and Path20 tests. The code now correctly parses svg arc flags as either 0 or 1 rather than a float. And will stop parsing paths if unknown characters are found within the data.

Correct SVGText Bounds, Issue #45

23 Jun 11:04
cc8059d
Compare
Choose a tag to compare

Corrects an issue with rotated SVGText bounds. And an issue where the bias in validation could produce wrong results for .reverse() call.

Corrections for Path Bounding Boxes

17 Jun 09:55
aeedb90
Compare
Choose a tag to compare

Corrects the PathSegment bounding boxes for Arc, QuadraticBezierCurve, and CubicBezierCurve.

Near Collinear Quad Corrections

14 Jun 12:01
a3841e5
Compare
Choose a tag to compare

Lengths for almost collinear quads could be outside the error range but still so close as to divide by zero or hit a domain value error.

.length()/.point() of lengthless paths

14 Jun 09:51
1df672c
Compare
Choose a tag to compare

.length() / .point() for lengthless paths no longer crashes.

Use/Def

13 Jun 12:38
9ad3a51
Compare
Choose a tag to compare

This version mostly corrects use/defs tags. These now are parsed inline with the data set.

Arcs have changed arc and sweep to arc_flag and sweep_flag to make them distinct from sweep.

Arcs allow definition based on a control point or a bulge.

Fixed several minor bugs.

Correct Inverse Matrix

24 Dec 05:31
93bac28
Compare
Choose a tag to compare

Corrects inverse matrix
Adds invert dunder '~'.
Adds coverage for inverse matrix.

Initial Transform, Tweaks.

23 Dec 19:24
efe37e2
Compare
Choose a tag to compare

Few required softened edges

Bounding Box

22 Dec 07:17
909eaf5
Compare
Choose a tag to compare

Improvements to .bbox() so that they are standardized for most SVGElements.