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 14:48, 11 November 2011
27 bytes removed
,
14:48, 11 November 2011
→Going from Drawable to Cairo
Line 176:
Line 176:
<pre>
<pre>
−
# From activity.Activity, you inherit a canvas.
Get its window.
+
# From activity.Activity, you inherit a canvas.
−
win = self.canvas.get_window()
−
# Create a Cairo context from the window.
# Create a Cairo context from the window.
−
cairo_context =
win
.cairo_create()
+
cairo_context =
self.canvas.get_window()
.cairo_create()
# Create a Cairo surface from the context
# Create a Cairo surface from the context
Walter
Bureaucrats
,
Administrators
10,533
edits