Generate SVG code on a programatic way.
Project description
ScalableWriter
SV (ScalableWriter) is a small library which can generate SVG code.
Install
# PIP
pip install ScalableWriter
# GIT+PIP
pip install git+https://github.com/ZSendokame/Scalable.git
Use
import scalable
# Specify output file, it also accepts a width and height arguments.
svg = scalable.SVG("output.html")
# The functions accept every keyword, translating them into SVG.
svg.rectangle(
x=150, y=60, width=25, height=75,
fill="red", stroke="black", stroke_width=2
)
svg.ellipse(cx=205, cy=120, rx=43, ry=91, fill="red", stroke="black")
svg.ellipse(cx=210, cy=70, rx=30, ry=15, fill="white", stroke="black")
svg.line(x1=151, y1=62, x2=169, y2=62, stroke="#aa0000", stroke_width=2)
# Save the file.
svg.save()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ScalableWriter-1.0.0.tar.gz
(3.0 kB
view details)
File details
Details for the file ScalableWriter-1.0.0.tar.gz
.
File metadata
- Download URL: ScalableWriter-1.0.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d842cb8a43ccda7d8bab2ff9d6bde4bbcef9eb60fbfea8bc8b80445664e9973 |
|
MD5 | 6f66935640d2c8ec42f09914a8411131 |
|
BLAKE2b-256 | 955874f5bd374c1ad141870f05aa454aaf99f700950ea70784d24add3f6bce44 |