vector_graphics_compiler
v1.2.3A compiler to convert SVGs to the binary format used by `package:vector_graphics`.
Архив пакета: https://pubdev.letsnova.ru/api/archives/vector_graphics_compiler/1.2.3.tar.gz
dart pub add vector_graphics_compilerREADME
vector_graphics_compiler
A compiler for package:vector_graphics.
This package parses SVG files into a format that the vector_graphics runtime can render.
Features
Supported SVG features:
- Groups, paths, and basic shapes are all supported.
- References, including out of order references.
- Linear and radial gradients, including radial gradients with focal points.
- Text
- Symbols
- Images
- Patterns
Unsupported SVG features:
- Filters
- Some text processing attributes
Optimizations:
- Opacity peepholing
- Transformation inlining (except for text and radial gradients)
- Group collapsing
- Mask and clip elimination
Commemoration
This package was originally authored by Dan Field and has been forked here from dnfield/vector_graphics. Dan was a member of the Flutter team at Google from 2018 until his death in 2024. Dan’s impact and contributions to Flutter were immeasurable, and we honor his memory by continuing to publish and maintain this package.
История изменений
1.2.3
- Fixes the SVG parser injecting a spurious space between adjacent
<tspan>elements that have no whitespace between them in the source. Previously<tspan>A</tspan><tspan>B</tspan>was emitted as"A"+" B", producing a visible gap; it now emits"A"+"B"to match every browser.
1.2.2
- Adds support for modern space-separated HSL and HSLA color syntax.
1.2.1
- Fixes HSL/HSLA color parsing for decimal percentage components (e.g.
hsl(270, 100%, 76.27%)).
1.2.0
- Adds support for percentage units in SVG shape attributes (rect, circle, ellipse, line).
1.1.20
- Fixes color parsing for modern rgb and rgba CSS syntax.
- Updates minimum supported SDK version to Flutter 3.35/Dart 3.9.
1.1.19
- Updates allowed version range of
xmlto include up to 6.6.1. - Updates minimum supported SDK version to Flutter 3.29/Dart 3.7.
1.1.18
- Updates minimum supported SDK version to Flutter 3.27/Dart 3.6.
- Fixes SVG matrix parsing to explicitly set the Z scale value.
1.1.17
- Fixes a bug where stroke opacity not applied by color mapper.
1.1.16
- Sets stroke-width to 1 by default when an invalid value is parsed instead of throwing an exception.
1.1.15
- Fixes a bug where empty tags caused the parser to crash.
1.1.14
- Makes the package WASM compatible.
1.1.13
- Relaxes dependency constraint on vector_graphics_codec.
1.1.12
- Transfers the package source from https://github.com/dnfield/vector_graphics to https://github.com/flutter/packages.
1.1.11+1
- Relax package:http constraint.
1.1.11
- Use package:http to drop dependency on dart:html.
1.1.10+1
- Add missing save before clip.
1.1.10
- Add missing clip before saveLayer.
1.1.9+2
- Fix case sensitivity on scientific notation parsing.
1.1.9+1
- Fix publication error that did not have latest source code.
1.1.9
- Fix handling of invalid XML
@idattributes. - Fix handling of self-referential
<use/>elements. - Add
--out-diroption to compiler. - Tweak warning message for unhandled eleemnts.
1.1.8
- Fix bugs in transform parsing.
1.1.7
- Support for matching the ambient text direction.
1.1.6
- Fix bug in text position computation when transforms are involved.
1.1.5+1
- Remove/update some invalid assertions related to image formats.
1.1.5
- Support for encoding path control points as IEEE 754-2008 half precision
floating point values using the option
--use-half-precision-control-points. - Added an error builder property to provide a fallback widget on exceptions.
1.1.4
- Support more image formats and malformed MIME types.
- Fix inheritence for
fill-rules.
1.1.3
- Further improvements to whitespace handling for text.
1.1.2
- Fix handling and inheritence of
none.
1.1.1
- Multiple text positioning bug fixes.
- Preserve stroke-opacity when specified.
1.1.0
- Fix a number of inheritence related bugs:
- Inheritence of properties specified on the root element now work.
- Opacity inheritence is more correct now.
- Inheritence of
useelements is more correctly handled.
- Make
currentColornon-null on SVG theme, and fix how it is applied. - Remove the opacity peephole optimizer, which was incorrectly applying optimizations in a few cases. A future release may add this back.
- Add clipBehavior to the widget.
- Fix patterns when multiple patterns are specified and applied within the graphic.
1.0.1
- Fix handling of unspecified fill colors on use/group elements.
1.0.0+1
- Fix issue in pattern decoding.
- Fix issue in matrix parsing for some combinations of matrices.
1.0.0
- Initial stable release.
- Parsing is now synchronous, and is easier to work with in tests.
- Correctly handle images with
ids and defined indefsblocks. - Compile time color remapping support.
0.0.3
- Better concurrency support
- Pattern support.
- Bug fixes around image handling.
- Bug fix for when optimizers are used on non-default fill types.
- Support for SVG theme related properties (currentColor, font-size, x-height).
0.0.2
- Add optimizations for masks, clipping, and overdraw.
0.0.1
- Create repository
