Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/14v/svg-non-stop
SVG import "Gradient has no stop info" fix
https://github.com/14v/svg-non-stop
android android-studio drawable gradient intellij-idea kotlin svg vector-assets vector-drawable
Last synced: 4 months ago
JSON representation
SVG import "Gradient has no stop info" fix
- Host: GitHub
- URL: https://github.com/14v/svg-non-stop
- Owner: 14v
- License: mit
- Created: 2020-01-16T00:59:37.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-13T03:35:30.000Z (almost 3 years ago)
- Last Synced: 2024-09-27T05:04:40.649Z (4 months ago)
- Topics: android, android-studio, drawable, gradient, intellij-idea, kotlin, svg, vector-assets, vector-drawable
- Language: Kotlin
- Homepage:
- Size: 57.6 KB
- Stars: 70
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SVG non-stop
## What is thisJava utility fixes `Gradient has no stop info` error when importing SVG files as vector assets in Android studio. This error results in corrupt drawable with empty gradient fills.
## How to use
1. Download binary from [releases/latest](https://github.com/14v/svg-non-stop/releases/latest)
2. Pass target SVG file name as parameter:
```
./bin/svg-non-stop my_vector_drawable.svg
```3. Result will be saved in `my_vector_drawable_nonstop.svg`. Use this file to import in IDE.
Optional parameters:
* `-f` to force overwrite target `_nonstop.svg` file,
* `-v` to have verbose output.## Technical notes
Utility copies stops definitions into target gradients in SVG file. Then IDE can process file correctly. Utility is _not_ for use in android code.For build use gradle `assemble` task and you will get `build/distributions/svg-non-stop-x.y.z.zip` archive.