Skip to content

Releases: fskpf/svg2roughjs

v3.2.1

17 Aug 08:44
Compare
Choose a tag to compare

Improved typing of the target element of the constructor.

v3.2.0

20 Nov 21:21
Compare
Choose a tag to compare

Added an optional parameter to sketch() that allows re-evaluation of the currently set source SVG container when executing sketch(). This enables the same Svg2Rough.js instance to be run multiple times on a single input container with changing SVG content.

v3.1.5

19 Nov 15:30
Compare
Choose a tag to compare

Updated readme and new a hero image

v3.1.4

18 Nov 22:22
Compare
Choose a tag to compare

Fixed randomly missing hachure fill when using randomized fills.

v3.1.3

02 Nov 18:36
Compare
Choose a tag to compare

Updated dependencies.

New Feature, Housekeeping

01 Jul 10:29
Compare
Choose a tag to compare

v3.1.0

New Features

  • Optional seed property to control the randomness of the sketch. Specifying this property implicitly sets the seed property for Rough.js to the same value. This may be overwritten by providing a different seed with the roughConfig object.

Housekeeping

  • Updated dependencies.

Features, Fixes, and Improvements

17 Apr 14:07
Compare
Choose a tag to compare

v3.0.0

New Features

  • Support for SVGPatternElements which are optionally sketched as well. Can be disabled with the new property sketchPatterns: bool.
  • Hachure fill styles are adjusted based on the shape's size and aspect-ratio to create a more vivid sketch.

Improvements

  • Floating point precision to is set to 3 by default to decrease SVG output file size. Can be overwritten by setting a specific fixedDecimalPlaceDigits in the roughConfig.
  • Removed units-css dependency.
  • HTML canvas output is now created with the SVG rendering and drawn onto canvas eventually. This supports more features than the previous direct canvas rendering.

Fixes

  • Fixed orientation of markers with auto or auto-start-reverse.
  • Fixed rendering of percentage values on presentation attributes (e.g. stroke-width).
  • Clips with SVGPathElement are now applied.
  • Clips on SVGGElements are now considered.
  • IE11: Fixed traversing of element tree when determing inherited presentation attributes.
  • IE11: Fixed missing data-uri images in sketched output.

Incompatible changes

  • Renamed RenderMode to OutputType to better account for its actual effect.
  • Renamed redraw() to sketch() which is now async.
  • Property changes do not automatically trigger repaints. So after changes, sketch() must be called explicitly now.

Bugfix

02 Apr 21:59
Compare
Choose a tag to compare

Fixed an infinite loop that was triggered by specific style configurations.

Bugfixes and Improvements

29 Mar 22:12
Compare
Choose a tag to compare
  • Fixed marker and foreignObject translation
  • Consider marker scaling in user-space
  • Improved handling of percentage width/height on input SVG,
  • Improved text rendering with tspan styling
  • Improved canvas text rendering for certain cases

Simple foreignObject support and viewBox fix

28 Mar 11:32
Compare
Choose a tag to compare
  • Copy foreignObject elements from the source SVG to the sketched SVG. These elements have been discarded previously but foreignObjects are sometimes used for text labels in SVGs (e.g. mermaid diagrams), so now they should at least appear in the SVG output. Note: This is currently only supported for SVG rendering.
  • Fixed default scaling behavior if viewBox differs from the viewport of the SVG. For preserveAspectRatio only none and the default (i.e. xMidYMid) behavior is supported.