require 'tk' c = TkCanvas.new.pack x1, y1 = 150, 50 TkcText.new(c, x1, y1, 'text'=>'hello, world', 'anchor'=>'w') TkcText.new(c, x1, y1+20, 'text'=>'hello, world', 'anchor'=>'center') TkcText.new(c, x1, y1+40, 'text'=>'hello, world', 'anchor'=>'e') Tk.mainloop