Quick search

Table Of Contents

SVG

New in version 1.9.0.

Warning

This is highly experimental and subject to change. Don’t use it in production.

Load an SVG as a graphics instruction:

from kivy.graphics.svg import Svg
with widget.canvas:
    svg = Svg("image.svg")

There is no widget that can display Svg directly, you have to make your own for now. Check the examples/svg for more informations.

class kivy.graphics.svg.Svg

Bases: kivy.graphics.instructions.RenderContext

Svg class. See module for more informations about the usage.

anchor_x

Horizontal anchor position for scaling and rotations. Defaults to 0. The symbolic values ‘left’, ‘center’ and ‘right’ are also accepted.

anchor_y

Vertical anchor position for scaling and rotations. Defaults to 0. The symbolic values ‘bottom’, ‘center’ and ‘top’ are also accepted.

filename

Filename to load.

The parsing and rendering is done as soon as you set the filename.