Skip to content

Releases: meerk40t/svgelements

Add in bounds with strokes: .bbox(with_stroke=True)

15 Sep 02:44
b23ff60
Compare
Choose a tag to compare

This version permits the calculation of bounding boxes with the given stroke-width values, for transformed and non-transformed shapes.

  • The goal of this is to provide a bounding box sufficient to capture not only the shape but the full displayed shape.

  • This version also includes some other minor changes to __repr__ for the various objects.

Numerical Stability of Arc Bulge near Slope Zero

06 Sep 11:45
d8f7589
Compare
Choose a tag to compare

If the slope is like 1e-15 close to zero it can cause the calculated center to move a bit.

Image and Text. Repr Corrections

05 Sep 00:01
9fecbe8
Compare
Choose a tag to compare

SVGImage and SVGText were renamed with strong backwards compatible assignments to Image and Text.
The potential for that to break compatibility is the reason for the this goes to 1.6.0 rather than 1.5.7. No testing found any breaks. If you import * the existence of svgelements.Image could mess with PIL namespaces. If you import correctly this should not be an issue.

The rest of this version is __repr__ corrections for the minor objects and coverage for those.

Minor Corrections

12 Aug 00:20
88e9f0f
Compare
Choose a tag to compare

Correct repr() values
Added a few __eq__() functions.
Correct degenerate width-less Rect.

Bug Fixes and Maintenance

09 Jun 14:52
3c5dce7
Compare
Choose a tag to compare
  • Fallback if scipy failed for any reason (it's not a requirement, but having it makes some math easier).
  • Interpolate Arcs As Cubics and Quads failed for degenerate Arcs.
  • Fixed rect of unknown size with unknown rounded corners would valueError on the length math without the conversions being known.
  • Shapes have ._strict value set to True. Could permit some non-spec behaviors in the future.
  • Rect allows for non-strict inverted rounded rectangle corners to imply scooped corners.
  • Corrected Issue #114.

Several bug fixes. Color.distinct()

30 May 05:36
cbe6a87
Compare
Choose a tag to compare
  • Correct Attributes-id bug in parsing end (could cause crashes during parsing)
  • Add attributes to .values, was otherwise unable to see what values that node originally had without cascading if a looking for a custom value.
  • Add Color.distinct() Allows simple color distinction algorithm.
  • Fixed kwargs 'alpha' bug. Weirdly, set the blue value.

Correct Small Bugs in Copy of Group and SVGText

06 May 10:15
Compare
Choose a tag to compare

A copy of SVGText object or a copy of a Group object didn't call the SVGElement defines to set the value of .values and .id instead leaving these with None value.

Smoothing the Rough Edges of 1.5.0

05 May 08:00
54765c2
Compare
Choose a tag to compare
  • Color can now accept keyword args with colors eg Color('red', alpha=180)
  • Default use of Color(int) is rgb. Eg. Color(0xFF0000, 0.5) is half opaque red.
  • Keyword args for Color accepts argb and rgba. Eg. Color(argb=0xFF00FF)
  • Keyword args added for hue, saturation, lightness and alpha.
  • Color has .argb, .rgb and .rgba properties. These can be set: color.argb = 0xFF0000FF
  • Color.hsl_to_int does not require creating a Color object. hsl init, calls the function.
  • .hue had a bug which gave the hue in turns. It should have given hue in degrees.

Correct Issue #109: RGBA

27 Apr 05:26
Compare
Choose a tag to compare

Corrects #109 with PR #110

@Lofgren correctly noted the CSS color definitions are RGBA and not ARGB. Especially regarding the parsing of 4 and 8 digit hex values this was parsed contrary to spec.

Major version bump, because this is a slightly breaking change as int(color) will now produce RGBA. If you convert colors with the .red .blue .green and .alpha the code will work the same. However if you converted to int(color) using or using .value within the color, the internal data value is now RGBA.

Some legacy code was eliminated.

Correct Issue #107

24 Apr 20:38
203dad2
Compare
Choose a tag to compare

The ability to perform t = Group() * Matrix() resulted in a crash due to it not initializing the copy() of the Group's .transform value.