Skip to main content

OpenGL SVG Renderer

Project description

glsvg
===============================================

A python library for parsing and displaying SVG files
using opengl, with a focus on being usable for games.

-----------------------------------------------
Usage
-----------------------------------------------
```python
import glsvg

# initialize opengl context
# ...

# load svg file
svg_doc = glsvg.SVG(filename)

# draw svg file
svg_doc.draw(x,y)
```

-----------------------------------------------
Status
-----------------------------------------------

Requires:
- PyOpenGL

Supported game libraries:
- PyGame
- Pyglet

Supported SVG features:
- All SVG path commands (arc/curves/lines/etc.)
- Basic SVG shapes (rectangle, ellipse)
- Per-Pixel Linear and Radial Gradients
- Parsable color names
- Variable line widths and miter/bevel joints

SVG Features In Progress:
- SVG patterns
- SVG effects (Drop shadow, blur, etc.)
- More sophisticated line effects (patterns, arc joints, etc.)

Likely to be not supported:
- Animation
- Text (this would be likely to require too many extra dependencies for fonts, but an easy workaround is to convert text
objects to paths in your editor, ie Inkscape or Illustrator)
- CSS based style tags

-----------------------------------------------
Credits:
-----------------------------------------------

Based on the squirtle mini-library by Martin O'Leary:

http://www.pyweek.org/d/1783/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

glsvg-0.4.tar.gz (392.5 kB view details)

Uploaded Source

File details

Details for the file glsvg-0.4.tar.gz.

File metadata

  • Download URL: glsvg-0.4.tar.gz
  • Upload date:
  • Size: 392.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for glsvg-0.4.tar.gz
Algorithm Hash digest
SHA256 2c556239c07df249dbb0999043b3e833afa3e73e6093a04eb9ea9c55be8b4bfa
MD5 9fce840c181675505540386589ed95fb
BLAKE2b-256 7d4b616f6dc6fe1bfda914c53d04f2028d8db4088ea42d2ea2610ccefee2e40f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page