Skip to main content

Loads SVG files into pyglet Batch objects for OpenGL rendering.

Project description

The polygons from the SVG file are tesselated using GLU functions, and used to create a pyglet Batch object of 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’ attribute, 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


Download files

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

Source Distribution

svgbatch-0.1.2.zip (10.5 kB view details)

Uploaded Source

File details

Details for the file svgbatch-0.1.2.zip.

File metadata

  • Download URL: svgbatch-0.1.2.zip
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for svgbatch-0.1.2.zip
Algorithm Hash digest
SHA256 11b618f19220e914c48b1a33e94522206572b3fc2dc3fd4cfe7c846ae11750a5
MD5 89cdff28eaf4823c00a9a91719bd90a2
BLAKE2b-256 a1636157c5ba6b6152912bff79eeeb169c604707160287219a9814e99735f3c9

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