Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drawing SVG on Kivy canvas

I am new to Kivy. i need to create a classic analog clock.

My Question is: how to draw svg graphics into kivy canvas?

like image 704
pylover Avatar asked Jan 23 '13 22:01

pylover


2 Answers

@incognick

There's no need to use any other libraries. Make a widget using Kivy itself.

To do this, first subclass kivy.widget.Widget, and then define a canvas with some kivy.graphics.Instruction in it.

More detail here.

like image 26
user3057719 Avatar answered Oct 22 '22 22:10

user3057719


Kivy master have now experimental SVG supports. It will be out in the 1.9.0.

See more at:

  • https://github.com/kivy/kivy/blob/master/examples/svg/main.py
  • https://github.com/kivy/kivy/blob/master/kivy/graphics/svg.pyx
  • https://twitter.com/mathieuvirbel/status/513161191817220097
like image 120
tito Avatar answered Oct 22 '22 22:10

tito