~brian-sidebotham/wxwidgets-cmake/wxpython-2.9.4

« back to all changes in this revision

Viewing changes to wxPython/demo/snippets/text.py

  • Committer: Brian Sidebotham
  • Date: 2013-08-03 14:30:08 UTC
  • Revision ID: brian.sidebotham@gmail.com-20130803143008-c7806tkych1tp6fc
Initial import into Bazaar

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
snippet_normalize (cr, width, height)
 
2
cr.select_font_face ("Sans", cairo.FONT_SLANT_NORMAL,
 
3
                     cairo.FONT_WEIGHT_BOLD)
 
4
cr.set_font_size (0.35)
 
5
 
 
6
cr.move_to (0.04, 0.53)
 
7
cr.show_text ("Hello")
 
8
 
 
9
cr.move_to (0.27, 0.65)
 
10
cr.text_path ("void")
 
11
cr.set_source_rgb (0.5,0.5,1)
 
12
cr.fill_preserve ()
 
13
cr.set_source_rgb (0,0,0)
 
14
cr.set_line_width (0.01)
 
15
cr.stroke ()
 
16
 
 
17
#/* draw helping lines */
 
18
cr.set_source_rgba (1,0.2,0.2, 0.6)
 
19
cr.arc (0.04, 0.53, 0.02, 0, 2*M_PI)
 
20
cr.arc (0.27, 0.65, 0.02, 0, 2*M_PI)
 
21
cr.fill ()
 
22