Releases: fskpf/svg2roughjs
Releases · fskpf/svg2roughjs
v3.2.1
v3.2.0
v3.1.5
v3.1.4
v3.1.3
New Feature, Housekeeping
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 theroughConfig
object.
Housekeeping
- Updated dependencies.
Features, Fixes, and Improvements
v3.0.0
New Features
- Support for
SVGPatternElements
which are optionally sketched as well. Can be disabled with the new propertysketchPatterns: 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 specificfixedDecimalPlaceDigits
in theroughConfig
. - 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
orauto-start-reverse
. - Fixed rendering of percentage values on presentation attributes (e.g.
stroke-width
). - Clips with
SVGPathElement
are now applied. - Clips on
SVGGElement
s 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
toOutputType
to better account for its actual effect. - Renamed
redraw()
tosketch()
which is now async. - Property changes do not automatically trigger repaints. So after changes,
sketch()
must be called explicitly now.
Bugfix
Bugfixes and Improvements
- 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
- Copy
foreignObject
elements from the source SVG to the sketched SVG. These elements have been discarded previously butforeignObject
s 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. ForpreserveAspectRatio
onlynone
and the default (i.e.xMidYMid
) behavior is supported.