Metadata-Version: 2.4
Name: pysvgwriter
Version: 2.10.0
Summary: SVG 1.1 as Python objects: draw, transform, combine, render and convert vector graphics.
Author: Josue N Rivera
License-Expression: MIT
Project-URL: Homepage, https://github.com/wzjoriv/svgwriter
Project-URL: Repository, https://github.com/wzjoriv/svgwriter
Project-URL: Documentation, https://wzjoriv.github.io/svgwriter
Project-URL: Bug Tracker, https://github.com/wzjoriv/svgwriter/issues
Keywords: svg,vector,graphics,drawing,animation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Multimedia :: Graphics :: Editors :: Vector-Based
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: skia-python>=87
Requires-Dist: numpy>=1.24
Requires-Dist: uharfbuzz>=0.40
Requires-Dist: tomlkit>=0.12
Requires-Dist: click>=8.1
Requires-Dist: python-lcms2>=0.4.1
Provides-Extra: office
Requires-Dist: python-pptx>=1.0; extra == "office"
Requires-Dist: python-docx>=1.1; extra == "office"
Requires-Dist: openpyxl>=3.1; extra == "office"
Requires-Dist: pillow>=10; extra == "office"
Requires-Dist: latex2mathml>=3.75; extra == "office"
Provides-Extra: plot
Requires-Dist: matplotlib>=3.7; extra == "plot"
Requires-Dist: ziaplot>=0.9; extra == "plot"
Provides-Extra: graph
Requires-Dist: networkx>=3.0; extra == "graph"
Requires-Dist: python-igraph>=0.11; extra == "graph"
Requires-Dist: rustworkx>=0.15; extra == "graph"
Provides-Extra: math
Requires-Dist: ziamath>=0.11; extra == "math"
Provides-Extra: fonts
Requires-Dist: fonttools>=4.40; extra == "fonts"
Requires-Dist: brotli>=1.0; extra == "fonts"
Provides-Extra: widget
Requires-Dist: ipywidgets>=8; extra == "widget"
Provides-Extra: cli
Requires-Dist: questionary>=2.0; extra == "cli"
Provides-Extra: notebook
Requires-Dist: nbformat>=5; extra == "notebook"
Requires-Dist: nbclient>=0.7; extra == "notebook"
Requires-Dist: ipykernel>=6; extra == "notebook"
Provides-Extra: test
Requires-Dist: pysvgwriter[cli,graph,math,office,plot,widget]; extra == "test"
Requires-Dist: pytest>=7; extra == "test"
Requires-Dist: ezdxf>=1.0; extra == "test"
Requires-Dist: pillow>=10; extra == "test"
Requires-Dist: fonttools>=4.40; extra == "test"
Provides-Extra: dev
Requires-Dist: pysvgwriter[docs,notebook,test]; extra == "dev"
Requires-Dist: stubpy>=0.13; extra == "dev"
Requires-Dist: typer>=0.12; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: ruff>=0.6; extra == "dev"
Requires-Dist: tomli; python_version < "3.11" and extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=7.0; extra == "docs"
Requires-Dist: furo>=2024.1.29; extra == "docs"
Requires-Dist: myst-parser>=2.0; extra == "docs"
Dynamic: license-file

# svgwriter

[![Tests](https://github.com/wzjoriv/svgwriter/actions/workflows/ci.yml/badge.svg)](https://github.com/wzjoriv/svgwriter/actions/workflows/ci.yml)
[![Docs](https://github.com/wzjoriv/svgwriter/actions/workflows/docs.yml/badge.svg)](https://wzjoriv.github.io/svgwriter)
[![PyPI](https://img.shields.io/pypi/v/pysvgwriter)](https://pypi.org/project/pysvgwriter/)
[![Python](https://img.shields.io/pypi/pyversions/pysvgwriter)](https://pypi.org/project/pysvgwriter/)
[![CPython 3.10-3.15](https://img.shields.io/badge/CPython-3.10%E2%80%933.15-blue)](https://github.com/wzjoriv/svgwriter/actions/workflows/ci.yml)
[![Linux · Windows · macOS](https://img.shields.io/badge/OS-Linux%20%C2%B7%20Windows%20%C2%B7%20macOS-blue)](https://github.com/wzjoriv/svgwriter/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)

Build, edit and render vector graphics in Python with a complete SVG 1.1 object model. Shapes move,
rotate and scale through one transform; geometry has boolean operations and measurement; text, images
and colors are first-class (numpy-backed); documents render with skia and export to PNG, PDF, TikZ, DXF
and more. Python 3.10+, `pip install pysvgwriter` (brings skia-python, numpy, uharfbuzz and tomlkit), then `import svgwriter`.

```python
import svgwriter as svg

doc = svg.Document()                                    # sized to its content when saved or shown
doc.rect(0, 0, 160, 60, rx=12, fill=svg.LinearGradient.horizontal("gold", "tomato"))
doc.circle(30, 30, 18, fill=(1, 1, 1, 0.8))             # colors: names, CSS, or 0-1 tuples (alpha too)
title = doc.text("svgwriter", x=104, y=35, font_size=15.3, text_anchor="middle")
title[3:].fill = "navy"                                  # style a character range (becomes a <tspan>)

star = svg.paths.star(0, 0, 10, points=5, fill="navy")
doc += star.place(30, 30).rotate(15)                    # placement and rotation go through `t`

doc.save("badge.svg")                                    # also .png .pdf .tex .eps .dxf .ico ...
pixels = doc.rasterize(scale=2)                          # numpy float32 RGBA, shape (rows, cols, 4)
```

<img src="https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/examples/readme.png" alt="The badge drawn by the code above" width="320">

## Feature overview

| Area | What you get |
| --- | --- |
| Elements | Every static SVG 1.1 element as a class with a lowercase alias (`svg.Circle` / `svg.circle`); every attribute readable and writable by its Python name (`el.stroke_width`, `el.view_box`) |
| Placement | `el.matrix` is one affine `Matrix`; `translate`, `rotate`, `scale`, `skew`, `flip_x`/`flip_y` (parent or `local=True` frame) about an `anchor` (bounding-box centre unless pinned); `place(x, y)`, `position`, `bounds()`; points and edges as attributes (`a.center = b.center`, `a.top = b.bottom + 4`); `doc.wireframe(bounds=True)` to see the geometry |
| Operators | `el + (dx, dy)`, `el * 2`, `el @ 30` (rotate), `M @ el`; `a \| b`, `a & b`, `a - b`, `a ^ b` boolean ops on shapes, text, groups and `<use>` |
| Paths | Fluent `svg.path().move_to(0, 0).line_to(10, 0).arc_to(5, 5, 10, 10).close()`; `path.nodes` as an `(N, 2)` array; length, point at length, contains, exact bounds, stroke-to-path, simplify; path effects baked into geometry (`roughen`, `dashed`, `stamp` a shape along a path) |
| Conversions | `to_path()` (text via glyph outlines, groups merged, clips flattened), `to_image()`, `rasterize()`, `to_group()`, `clone(linked=True)` for `<use>`; clear errors when impossible |
| Clipping | `art.clip(svg.circle(50, 50, 40))` on any element; `flatten_clip()` |
| Text | `text[i]` / `text[a:b]` move, rotate or style characters while staying real text; `tspan` layout, CSS and inherited fonts; `text.glyphs()` for free-form outlines |
| Colors and images | `Color` in 0-1 floats with alpha (auto `*-opacity`); `Image(numpy_array)` with color channels and broadcastable alpha; `Image.open("photo.png")`; Porter-Duff compositing `a \| b` (over), `a & b` (in), `a - b` (out), `a ^ b`, `a * b` (multiply), `a.composite(b, "screen")` |
| Documents | `doc[0]`, `doc["logo"]`, `for el in doc`; auto-size to content; definitions land in `<defs>` when referenced; `doc.add(x)` takes elements, documents, matplotlib figures and anything with `__svgwriter__`, `_repr_svg_`, `_repr_png_` or `_repr_jpeg_` (see [Adding other objects](#adding-other-objects)); notebook display |
| Themes | `svg.Theme` palettes, fonts and role styles; `el.as_role("box")` marks elements, the document writes one CSS rule per role so the SVG stays restylable; eleven built-in themes (light, dark, paper, print, mono, noir, brutalist, dracula, ...); `=` expressions in theme files; `theme.replace(...)` variants, TOML theme files, `with theme:` defaults |
| Presets | Catalogues of ready-made looks, each open to your own with a decorator: `fill=svg.patterns.hatch()` (stripes, dots, checker, grid, waves, seeded noise, ...), `svg.gradients.sunset()` and OKLCH blends, `el.filter = svg.filters.long_shadow()` (shadows, glow, outline, emboss, grain, duotone, goo, lighting), `marker_end=svg.markers.arrow()` sized by stroke width, and effects for any element that keep text as text: `shape.effect("neon")`, `text[4:9].effect("fire")` (fire, ice, smoke, metal, wind, snow, neon, glitch), animated for SVG, GIF and video |
| Rendering | skia: `rasterize(pixels=..., padding=...)` to numpy, embedded and linked images, text, CSS `<style>`; deterministic output |
| Export / import | A registry by name or extension: more than 30 formats from SVG and PNG to PDF, TikZ, DXF, G-code, PowerPoint, Graphviz and Mermaid (see [Export and import](#export-and-import)); `class Foo(svg.Format, name="foo")` adds more |
| Projects | `svgwriter new my-poster --preset poster` starts a design folder (`svgwriter.toml`, theme, components, animations, assets); `svgwriter build` writes every output and `svgwriter preview` reloads a browser page on save; `blank`, `poster`, `slides` and `animation` presets build out of the box, as scripts or notebooks |
| Sizes and units | `svg.Document(size="a4")`, `"letter"`, `"slide-16:9"`, `"instagram-story"`, ... with real units, so the drawing counts in mm or inches; `svg.mm`, `svg.inch`, `svg.pt` lengths and `svg.deg`, `svg.turn` angles |
| Widgets | `@svg.widgets.controls(hue=(0, 360), suit=["♠", "♥"], glow=False)` declares sliders, button rows, toggles and colour pickers as plain data; `svg.interact(fn)` shows them beside the live drawing in a notebook (`pysvgwriter[widget]`) with `.values`, `.save()` and `.code()`; `svgwriter preview` shows the same controls as a form; `svg.sweep(fn, hue=(0, 360))` animates them into baked SVG, GIF, MP4 or PowerPoint |
| Animation | SMIL elements; `el.animate` presets plus your own as typed functions (`@svg.preset.animation`, per-frame `@svg.preset.behavior`, `el.animate.apply(fn, ...)`); started by a click or hover with `el.animate.on("click")` and hover styles with `el.on_hover(fill=...)`, bundled as interaction presets (`el.interact.button()`, `@svg.preset.interaction`) (no script); `svg.Scene` classes, several per file, rendered by `svgwriter animate`; Python-driven scenes baked into SMIL so SVG files play like the video; PowerPoint slide effects both ways; `svg.interpolate(a, b, t)` tweens numbers, colors, transforms and morphs any two shapes |

## Geometry in one minute

SVG coordinates are an element's own geometry and are written exactly as given; everything after that
goes through the transform, so the output stays the SVG a person would write.

```python
import svgwriter as svg

c = svg.circle(50, 50, 10)          # writes cx="50" cy="50" r="10"
c.translate(20, 0).rotate(45)       # parent axes by default; local=True for the shape's own axes
print(c.cx, c.position)             # 50.0 (local geometry) and where its centre is now: (70, 50)
print(c.matrix)                         # shortest equivalent transform text

ring = svg.circle(0, 0, 40) - svg.circle(0, 0, 25)   # boolean difference, a <path>
print(round(ring.total_length(), 1), ring.contains_point(0, 0))
```

`*` and `@` never bake coordinates: `el * 2` is a scaled copy, `el @ 30` a rotated copy and `M @ el` a
copy with matrix `M` applied. Baking is explicit: `el.to_path()` folds the transform into `d`.

## Adding other objects

`doc.add(x)` (and `group.add(x)`) turns whatever it is given into elements, trying in this order: an
element; any object with an `__svgwriter__()` method, which returns an element, a document or anything
else `add` takes; a `Document` (a copy of its `<svg>` in a `<g>`); a networkx, igraph or rustworkx
graph (with `pysvgwriter[graph]`); a numpy array (an `<image>`); a
matplotlib figure or anything with `savefig`, and anything with `_repr_svg_` (the IPython display protocol), parsed into editable SVG elements; and
anything with only `_repr_png_` or `_repr_jpeg_`, embedded as an `<image>`.

```python
class Badge:
    def _repr_svg_(self):
        return '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><circle cx="10" cy="10" r="9"/></svg>'

doc.add(Badge()).translate(150, 10).scale(0.5)          # also: doc.add(fig) for a matplotlib figure
```

## Export and import

Formats are found by name or file extension: `doc.save("figure.pdf")`, `svg.Document.open("figure.pdf")`,
`doc.export("eps")` for bytes. `svg.formats.writers()` and `svg.formats.readers()` list the formats.

| Format | Extension(s) | Export | Import | Notes |
|---|---|:---:|:---:|---|
| SVG | `.svg` | ✓ | ✓ | the native format; ids, links, `<style>` and animation kept; `pretty`, `precision`, `compact_paths` |
| SVGZ | `.svgz` | ✓ | ✓ | gzip-compressed SVG |
| PNG | `.png` | ✓ | ✓ | `scale`, `size`, `padding`, `background`; text becomes pixels; import is an `<image>` |
| JPEG | `.jpg` `.jpeg` | ✓ | ✓ | `quality`; import is an `<image>` |
| WebP | `.webp` | ✓ | ✓ | `quality`; import is an `<image>` |
| BMP | `.bmp` | ✓ | ✓ | import is an `<image>` |
| GIF (incl. animated) | `.gif` | ✓ | ✓ | animated automatically when the drawing has SMIL animation (`fps`, `duration`, `loop`; no ffmpeg); import is the first frame as an `<image>` |
| APNG | `.png` | ✓ | ✓ | `animate=True` plays the SMIL animation; import is the first frame |
| Animated WebP | `.webp` | ✓ | ✓ | `animate=True`; import is the first frame |
| PPM / PGM / PNM | `.ppm` `.pgm` `.pnm` | ✓ | ✓ | import also reads `.pbm` |
| ICO | `.ico` | ✓ | ✓ | PNG entries at `sizes=`, `padding=`; import takes the largest image |
| ICNS | `.icns` | ✓ | ✓ | standard and Retina sizes; import takes the largest image |
| PDF | `.pdf` | ✓ | ✓ | vector (skia); text kept as text, in an embedded font subset; import reads paths, images, clips, text and shadings, `page=`; links stay clickable; a list of documents gives one page each |
| EPS / PostScript | `.eps` `.ps` | ✓ | ✓ | text kept as text (ASCII in standard fonts); no transparency; import is a small PostScript interpreter |
| TikZ | `.tikz` `.tex` | ✓ | ✓ | `standalone=True` for a compilable document; text kept as `\node`; import reads `\draw`, `\fill`, nodes, `\foreach` |
| DXF | `.dxf` | ✓ | ✓ | CAD polylines in mm, one layer per colour; import reads lines, polylines, circles, arcs, ellipses |
| HPGL | `.hpgl` `.plt` | ✓ | ✓ | pen plotters and cutters, one pen per colour |
| G-code | `.gcode` `.nc` `.ngc` | ✓ | ✓ | `mode="mill"` or `"laser"`, `feed`, `cut_z`, `tolerance` |
| Excalidraw | `.excalidraw` | ✓ | ✓ | writes outlines, text, images and links; import reads shapes, arrows, text, images and groups (also `.json`) |
| HTML | `.html` `.htm` | ✓ | ✓ | standalone page with the SVG inline (text kept as text), `css=`, `handlers=`; import reads the first inline `<svg>` |
| PowerPoint | `.pptx` | ✓ | ✓ | needs `pysvgwriter[office]`; editable shapes and text boxes both ways, `slide=` on import; text kept as text; a list of documents gives one slide each; `svg.latex` formulas become editable equations |
| Word | `.docx` | ✓ | ✓ | needs `pysvgwriter[office]`; editable shapes, pictures and text boxes out; import lays out paragraphs, headings, lists and styled runs as `<text>` with pictures in flow; `svg.latex` formulas become editable equations |
| Excel | `.xlsx` | ✓ | — | needs `pysvgwriter[office]`; the drawing as a picture |
| Markdown | `.md` `.markdown` | — | ✓ | headings, lists, code and bold become `<text>` |
| Plain text | `.txt` `.text` | — | ✓ | one `<text>` per line |
| Graphviz DOT | `.dot` `.gv` | — | ✓ | laid out by Graphviz (`dot`, or `SVGWRITER_DOT`) |
| Mermaid | `.mmd` `.mermaid` | — | ✓ | flowcharts need no tool (built-in parser and layout); other diagrams use `mmdc` (`SVGWRITER_MMDC`) |
| PlantUML | `.puml` `.plantuml` | — | ✓ | drawn by `plantuml` |
| D2 | `.d2` | — | ✓ | drawn by `d2` |
| LaTeX math | `svg.latex(...)` | — | ✓ | formulas as glyph outlines: TeX (`latex` + `dvisvgm`), else Ziamath (`pysvgwriter[math]`), else matplotlib mathtext |
| Video frames | `.mp4` `.webm` `.mov` | ✓ | ✓ | needs ffmpeg: `render_animation` writes frames, `svgwriter.motion.video.Video` reads them |

A `svg.Format` subclass adds a format of your own, and packages add formats, presets, themes and more
through entry points (see [Extending svgwriter](https://wzjoriv.github.io/svgwriter/guides/extending.html)).

```python
doc.save("figure.pdf")                         # vector PDF
doc.save("figure.tex", standalone=True)        # TikZ picture
doc.save("plate.dxf")                          # CAD/CNC polylines in millimetres
doc.save("icon.ico", sizes=(16, 32, 48), padding=4)
svg.Document.open("sketch.excalidraw").save("sketch.svg")
```

## Demos

[`demos/`](https://github.com/wzjoriv/svgwriter/tree/main/demos) holds complete design projects, each an ordinary `svgwriter new` project that uses several features together; open one and run `svgwriter preview`, or open the notebook in its folder to see it step by step with pictures and live controls (see the [demos page](https://wzjoriv.github.io/svgwriter/dev/demos.html)).

| | | | | | |
|:---:|:---:|:---:|:---:|:---:|:---:|
| [![Playing card](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/demos/playing-card.png)](https://github.com/wzjoriv/svgwriter/blob/main/demos/playing-card/playing-card.ipynb)<br>[Playing card](https://github.com/wzjoriv/svgwriter/blob/main/demos/playing-card/playing-card.ipynb) | [![Calculator kit](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/demos/calculator-kit.png)](https://github.com/wzjoriv/svgwriter/blob/main/demos/calculator-kit/calculator-kit.ipynb)<br>[Calculator kit](https://github.com/wzjoriv/svgwriter/blob/main/demos/calculator-kit/calculator-kit.ipynb) | [![Effects](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/demos/effects.gif)](https://github.com/wzjoriv/svgwriter/blob/main/demos/effects/effects.ipynb)<br>[Effects](https://github.com/wzjoriv/svgwriter/blob/main/demos/effects/effects.ipynb) | [![Planets explainer](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/demos/planets-explainer.gif)](https://github.com/wzjoriv/svgwriter/blob/main/demos/planets-explainer/planets-explainer.ipynb)<br>[Planets explainer](https://github.com/wzjoriv/svgwriter/blob/main/demos/planets-explainer/planets-explainer.ipynb) | [![Blobs](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/demos/blobs.gif)](https://github.com/wzjoriv/svgwriter/blob/main/demos/blobs/blobs.ipynb)<br>[Blobs](https://github.com/wzjoriv/svgwriter/blob/main/demos/blobs/blobs.ipynb) | [![A4 poster](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/demos/poster.png)](https://github.com/wzjoriv/svgwriter/blob/main/demos/poster/poster.ipynb)<br>[A4 poster](https://github.com/wzjoriv/svgwriter/blob/main/demos/poster/poster.ipynb) |

## Examples

[`examples/`](https://github.com/wzjoriv/svgwriter/tree/main/examples) is a nineteen-step learning path, from shapes to formats, animation, scenes, interop, a logo, themes, PowerPoint and preset libraries; each step is a runnable script with a Jupyter notebook next to it that shows the results as pictures (see its [README](https://github.com/wzjoriv/svgwriter/blob/main/examples/README.md)). All pictures below are rendered by svgwriter.

[![One drawing in every built-in theme](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/examples/themes.png)](https://github.com/wzjoriv/svgwriter/blob/main/examples/14_themes/themes.ipynb)

[One drawing in every built-in theme](https://github.com/wzjoriv/svgwriter/blob/main/examples/14_themes/themes.ipynb)

| | | |
|:---:|:---:|:---:|
| [![Shapes, gradients, text](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/examples/basic_shapes.png)](https://github.com/wzjoriv/svgwriter/blob/main/examples/01_basic_shapes/basic_shapes.ipynb)<br>[Shapes, gradients, text](https://github.com/wzjoriv/svgwriter/blob/main/examples/01_basic_shapes/basic_shapes.ipynb) | [![Transforms](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/examples/transforms.png)](https://github.com/wzjoriv/svgwriter/blob/main/examples/02_transforms_and_layout/transforms_and_layout.ipynb)<br>[Transforms](https://github.com/wzjoriv/svgwriter/blob/main/examples/02_transforms_and_layout/transforms_and_layout.ipynb) | [![Boolean operations](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/examples/boolean_ops.png)](https://github.com/wzjoriv/svgwriter/blob/main/examples/03_paths_and_geometry/paths_and_geometry.ipynb)<br>[Boolean operations](https://github.com/wzjoriv/svgwriter/blob/main/examples/03_paths_and_geometry/paths_and_geometry.ipynb) |
| [![Typography](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/examples/typography.png)](https://github.com/wzjoriv/svgwriter/blob/main/examples/04_typography/typography.ipynb)<br>[Typography](https://github.com/wzjoriv/svgwriter/blob/main/examples/04_typography/typography.ipynb) | [![Filter effects](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/examples/filter_effects.png)](https://github.com/wzjoriv/svgwriter/blob/main/examples/05_paint_and_filters/paint_and_filters.ipynb)<br>[Filter effects](https://github.com/wzjoriv/svgwriter/blob/main/examples/05_paint_and_filters/paint_and_filters.ipynb) | [![Lighting, displacement, images](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/examples/lighting.png)](https://github.com/wzjoriv/svgwriter/blob/main/examples/05_paint_and_filters/paint_and_filters.ipynb)<br>[Lighting, displacement, images](https://github.com/wzjoriv/svgwriter/blob/main/examples/05_paint_and_filters/paint_and_filters.ipynb) |
| [![Paths and markers](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/examples/paths_and_markers.png)](https://github.com/wzjoriv/svgwriter/blob/main/examples/03_paths_and_geometry/paths_and_geometry.ipynb)<br>[Paths and markers](https://github.com/wzjoriv/svgwriter/blob/main/examples/03_paths_and_geometry/paths_and_geometry.ipynb) | [![LaTeX math](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/examples/math.png)](https://github.com/wzjoriv/svgwriter/blob/main/examples/08_math_and_diagrams/math_and_diagrams.ipynb)<br>[LaTeX math](https://github.com/wzjoriv/svgwriter/blob/main/examples/08_math_and_diagrams/math_and_diagrams.ipynb) | [![Mermaid flowchart](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/examples/flowchart.png)](https://github.com/wzjoriv/svgwriter/blob/main/examples/08_math_and_diagrams/math_and_diagrams.ipynb)<br>[Mermaid flowchart](https://github.com/wzjoriv/svgwriter/blob/main/examples/08_math_and_diagrams/math_and_diagrams.ipynb) |
| [![Animation presets](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/examples/animation.gif)](https://github.com/wzjoriv/svgwriter/blob/main/examples/09_animation/animation.ipynb)<br>[Animation presets](https://github.com/wzjoriv/svgwriter/blob/main/examples/09_animation/animation.ipynb) | [![Scenes](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/examples/scenes.gif)](https://github.com/wzjoriv/svgwriter/blob/main/examples/13_scenes/scenes.ipynb)<br>[Scenes](https://github.com/wzjoriv/svgwriter/blob/main/examples/13_scenes/scenes.ipynb) | [![PowerPoint with an editable equation](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/examples/powerpoint.png)](https://github.com/wzjoriv/svgwriter/blob/main/examples/15_powerpoint/powerpoint.ipynb)<br>[PowerPoint with an editable equation](https://github.com/wzjoriv/svgwriter/blob/main/examples/15_powerpoint/powerpoint.ipynb) |
| [![Effects that keep text as text](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/examples/effects.gif)](https://github.com/wzjoriv/svgwriter/blob/main/examples/19_presets/presets.ipynb)<br>[Effects that keep text as text](https://github.com/wzjoriv/svgwriter/blob/main/examples/19_presets/presets.ipynb) | [![Filters](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/examples/filter_catalogue.png)](https://github.com/wzjoriv/svgwriter/blob/main/examples/19_presets/presets.ipynb)<br>[Filters](https://github.com/wzjoriv/svgwriter/blob/main/examples/19_presets/presets.ipynb) | [![Gooey blobs](https://raw.githubusercontent.com/wzjoriv/svgwriter/main/docs/_static/examples/goo.gif)](https://github.com/wzjoriv/svgwriter/blob/main/examples/19_presets/presets.ipynb)<br>[Gooey blobs](https://github.com/wzjoriv/svgwriter/blob/main/examples/19_presets/presets.ipynb) |

Regenerate the pictures and the demo tiles (PNG, and the animations as GIF) with `python scripts/dev.py svgwriter gallery`.

## Contributing

Development setup, commands and conventions are in the [contributing guide](https://wzjoriv.github.io/svgwriter/dev/contributing.html).

MIT licensed.
