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

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2013年 3月 23日 (土) 15:33:21 JST


-------------------------
REMOTE_ADDR = 70.49.48.128
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-dancr-rbcatut
-------------------------
@@ -130,7 +130,11 @@
      window.show_all
      Gtk.main
 
-    The lines containing comments are the additions that turn the above 'minimal-rb-cr.rb' program into our template file.
+    The lines containing comments are the additions that turn the above 'minimal-rb-cr.rb' program into our template file. Note, your cairo code will go between the two dotted lines. Also do not overlook the following line:
+
+         width, height = drawing_area.window.size    # You will likely need w, h
+
+    As the comment suggests, you are likely to need the size of the cairo drawing area, especially, when you would want the x,y coordinates depend on the size of the cairo "canvas". I suggest, you make it a habit to always include this line, hence it should be part of the template code. 
 
     :A Real Life Example With Runing Cairo Code   
 




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