Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristhofer Travieso <cristhofert97@gmail.com>2014-03-02 03:12:54 (GMT)
committer Cristhofer Travieso <cristhofert97@gmail.com>2014-03-02 03:12:54 (GMT)
commit6a0f67c774c9a44c09e36f90c704632b028364c1 (patch)
treeed6d93df5e62e0dbe616aef407bd231ded1ad2d0
parentae691eb09fd6c2f1df81ddd1b1063ace6ca1dcac (diff)
Add image SVGHEADmaster
Signed-off-by: Cristhofer Travieso <cristhofert97@gmail.com>
-rw-r--r--glucosa.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/glucosa.py b/glucosa.py
index e80ae44..e18a614 100644
--- a/glucosa.py
+++ b/glucosa.py
@@ -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."""