Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar/graphics
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2010-01-31 16:41:34 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2010-01-31 16:41:34 (GMT)
commit4a4ea538cacd740f8e32f625d400e26ab590daa0 (patch)
tree57908572539b62bee9c440e7d446ee2492e50576 /src/sugar/graphics
parent6f3ecbdb1f765b4d1561525f7b868708488edde8 (diff)
Supplement #1687 by docstring
Diffstat (limited to 'src/sugar/graphics')
-rw-r--r--src/sugar/graphics/icon.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/sugar/graphics/icon.py b/src/sugar/graphics/icon.py
index cf269be..4a94479 100644
--- a/src/sugar/graphics/icon.py
+++ b/src/sugar/graphics/icon.py
@@ -1149,6 +1149,27 @@ def get_icon_file_name(icon_name):
def get_surface(**kwargs):
+ """Get cached cairo surface.
+
+ Keyword arguments:
+ icon_name -- name of icon to load, default None
+ file_name -- path to image file, default None
+ fill_color -- for svg images, change default fill color
+ default None
+ stroke_color -- for svg images, change default stroke color
+ default None
+ background_color -- draw background or surface will be transparent
+ default None
+ badge_name -- name of icon which will be drawn on top of
+ original image, default None
+ width -- change image width, default None
+ height -- change image height, default None
+ cache -- if image is svg, keep svg file content for later
+ scale -- scale image, default 1.0
+
+ Return: cairo surface or None if image was not found
+
+ """
icon = _IconBuffer()
for key, value in kwargs.items():
icon.__setattr__(key, value)