Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)
Convert an SVG file to a hash of Py2D Polygons.

The hash keys will be the ids set to the corresponding <path> elements in the SVG file.
The hash value is a list of polygons, the first one being the outline polygon and all additional polygons being holes.

@param f: File object or file name to a SVG file.

@type transform: Transform
@param transform: A transformation to apply to all polygons

src/p/y/Py2D-HEAD/examples/SVG.py   Py2D(Download)
import pygame
from pygame.locals import *
from py2d.Math import *
from py2d.SVG import convert_svg