Skip to content

A program that automatically transforms your .svg to another viewBox, taking in count points, paths, positions and more!

License

Notifications You must be signed in to change notification settings

PYramid8955/SvgViewBoxTransformer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SvgViewBoxTransformer

A program that automatically converts your SVG 🖼️ to another viewBox size, taking in count points, paths, positions and more! 🎉

To run the program you need to have Python3 installed on your machine (preinstalled on the majority of linux systems) and BeautifulSoup4

  • You can install the latest version of Python here.
  • To install BeautifulSoup4 just open your terminal, type pip install beautifulsoup4 and press Enter.

Dependencies:

Python3 (the programming language)

BeautifulSoup4 (to work with xml)

  • After you have installed all the dependencies and downloaded the source code you can run the program by typing in the terminal (that's opened in the directory you downloaded the source code) python3 ChangeViewBox.py and pressing Enter.

  • if there is any bug with lxml, please try running pip install lxml.

* Make sure you downloaded both: ChangeViewBox.py and the Packages directory.

What can this program do?

  • There are several options to choose from (you will see when you'll run it :D). E.g. It can read the code from an already created svg file and convert into the desired viewbox in the desired file. And it (should) work with any viewbox, for example "16 32" (observed bugs with h/H and v/V in path, so If you want it to work properly with max_x != max_y, please replace them with l/L).
  • Currently the program is limited to changing width, x, cx, rx, height, y, cy, ry, points, d, r, stroke-width, therefore you could still need to change some parameters by yourself, taking transform for instance. But here comes the following option:
  • You can choose an option that will convert your desired number to another viewbox, yet this option, unlike the precedent one, only works with svgs with the same viewbox's height and width, for example "0 0 16 16", where 16 == 16.

Made with ❤️ by PYramid8955. Hope you'll find it helpful! Don't hesitate to leave a star! 🌟.

About

A program that automatically transforms your .svg to another viewBox, taking in count points, paths, positions and more!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages