Loads SVG into pyglet Batch objects of OpenGL GL_TRIANGLE primitives.
Project description
SvgBatch loads SVG files and tesselates the resulting polygons using GLU functions to create a pyglet Batch object using indexed vertex arrays. The Batch will aggregate all paths from an SVG file into a single OpenGL GL_TRIANGLES primitive for rendering. Each path is also exposed in its untessellated form, indexed by ‘id’ attributes, so the application could use them for collision detection, for example. Currently only a subset of SVG is handled - closed polygons, filled with solid color. These may comprise multiple loops (disjoint areas or holes), but must be made up from straight line edges. Arc polygon edges, gradient fills and other SVG entities (such as rectangles or text) are not currently handled. Requires pyglet.
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
File details
Details for the file svgbatch-0.1.1.zip
.
File metadata
- Download URL: svgbatch-0.1.1.zip
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a127f0b9a937122c6bc44bb87fcd83398aeb45b2f8bc394f0fc32290f8fc8b3 |
|
MD5 | df27af29108bf53737df78729fac7cf2 |
|
BLAKE2b-256 | 8292d2a139291f6426c038ba043f16d819e92ab232e1a04474fe4437bab65ef5 |