[ruby-gnome2-doc-cvs] [Ruby-GNOME2 Project Website] update - tut-gtk2-dancr-rbcatut

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2013年 3月 27日 (水) 04:42:46 JST


-------------------------
REMOTE_ADDR = 70.49.48.128
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-dancr-rbcatut
-------------------------
@@ -412,8 +412,9 @@
     The ((<cairo_show_text()|URL:http://www.cairographics.org/manual/cairo-text.html#cairo-show-text>)) operation forms the mask from text. It may be easier to think of cairo_show_text() as a shortcut for creating a path with ((<cairo_text_path()|URL:http://www.cairographics.org/manual/cairo-Paths.html#cairo-text-path>)) and then using ((<cairo_fill()|URL:http://www.cairographics.org/manual/cairo-cairo-t.html#cairo-fill>)) to transfer it. Be aware cairo_show_text() caches glyphs so is much more efficient if you work with a lot of text.
 
 
-    {{image_right("1203-p06-showtext-a.png")}}
 
+    {{br}}{{image_right("1203-p06-showtext-a.png")}}
+
      # -- your code - start ------------------------------- -s-
      cr.select_font_face("Sans", nil, nil)
      cr.set_font_size(0.8)
@@ -429,10 +430,12 @@
 
     The other thing that is not completely implemented in Ruby, and hence prevents us to translate the the original Michael's "showtext" code snippet is the omission of cairo's font description constants.  
 
-    {{image_right("1203-p06-showtext-a.png")}}
 
     Lets look at the complete working Ruby version "Show Text / Glyphs" example program. I took liberty to add and change a few things, as well as comment the most important issues.
 
+    {{br}}{{image_right("1203-p06-showtext-rb-s1.png")}}
+
      #!/usr/bin/env ruby
      $: << '~/work/HikiLib'
      require 'hiki2-gtk-w-cairo.rb'
@@ -479,6 +481,9 @@
      window = TextExtendsDemo.new("TextExtends Tut. Example")
      window.show_all
      Gtk.main
+
 
 
 




ruby-gnome2-cvs メーリングリストの案内
Back to archive index