diff options
author | Cristhofer Travieso <cristhofert97@gmail.com> | 2014-03-02 03:12:54 (GMT) |
---|---|---|
committer | Cristhofer Travieso <cristhofert97@gmail.com> | 2014-03-02 03:12:54 (GMT) |
commit | 6a0f67c774c9a44c09e36f90c704632b028364c1 (patch) | |
tree | ed6d93df5e62e0dbe616aef407bd231ded1ad2d0 | |
parent | ae691eb09fd6c2f1df81ddd1b1063ace6ca1dcac (diff) |
Signed-off-by: Cristhofer Travieso <cristhofert97@gmail.com>
-rw-r--r-- | glucosa.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -62,7 +62,11 @@ def load_surface(path): raise Exception("File not found: %s" % (path)) # TODO: no asumir que siempre que cargan PNGs. - return cairo.ImageSurface.create_from_png(path) + try: + return cairo.ImageSurface.create_from_png(path) + except: + return cairo.ImageSurface.create_from_svg(path) + def render_text(context, x, y, text, color, size, face): """Dibuja una cadena de texto sobre el contexto de canvas.""" |