Open main menu
Home
Random
Log in
Settings
About Sugar Labs
Disclaimers
Sugar Labs
Search
Changes
← Older edit
Newer edit →
Features/GTK3/Porting
(view source)
Revision as of 13:49, 11 November 2011
40 bytes added
,
13:49, 11 November 2011
→Going from Drawable to Cairo
Line 176:
Line 176:
<pre>
<pre>
+
import cairo
+
# From activity.Activity, you inherit a canvas.
# From activity.Activity, you inherit a canvas.
# Create a Cairo context from the window.
# Create a Cairo context from the window.
Line 208:
Line 210:
<pre>
<pre>
+
import pango, pangocairo
+
# Again, from the xlib_surface...
# Again, from the xlib_surface...
cairo_context = cairo.Context(xlib_surface)
cairo_context = cairo.Context(xlib_surface)
Walter
Bureaucrats
,
Administrators
10,579
edits