diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-05-14 09:41:59 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-05-14 09:41:59 +0000 |
commit | d3a8f9b361470dc928e7804f14638366367f8362 (patch) | |
tree | 832a6321b819a7c9c8178c02de871b777fe2960c /ext/tk/sample/demos-en | |
parent | dca0de41913ee3de07da76aca9d096b07e685870 (diff) | |
download | ruby-d3a8f9b361470dc928e7804f14638366367f8362.tar.gz |
* ext/tk/lib/tk/canvas.rb: improve coords support for canvas items.
Now, supports all of the followings.
TkcLine.new(c, 0, 0, 100, 100, :fill=>'red')
TkcLine.new(c, [0, 0, 100, 100], :fill=>'red')
TkcLine.new(c, [0, 0], [100, 100], :fill=>'red')
TkcLine.new(c, [[0, 0], [100, 100]], :fill=>'red')
TkcLine.new(c, :coords=>[0, 0, 100, 100], :fill=>'red')
TkcLine.new(c, :coords=>[[0, 0], [100, 100]], :fill=>'red')
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/demos-en')
-rw-r--r-- | ext/tk/sample/demos-en/items.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/tk/sample/demos-en/items.rb b/ext/tk/sample/demos-en/items.rb index 974d7caef9..81b447878c 100644 --- a/ext/tk/sample/demos-en/items.rb +++ b/ext/tk/sample/demos-en/items.rb @@ -184,7 +184,7 @@ TkcText.new(cvs, '22.5c', '9c', 'anchor'=>'n', 'font'=>font1, 'width'=>'4c', 'text'=>'A short string of text, word-wrapped, justified left, and anchored north (at the top). The rectangles show the anchor points for each piece of text.', 'tags'=>$tag_item ) TkcRectangle.new(cvs, '25.4c','10.9c','25.6c','11.1c') TkcText.new(cvs, '25.5c', '11c', 'anchor'=>'w', 'font'=>font1, 'fill'=>blue, - 'text'=>'Several lines,\n each centered\nindividually,\nand all anchored\nat the left edge.', 'justify'=>'center', 'tags'=>$tag_item ) + 'text'=>"Several lines,\n each centered\nindividually,\nand all anchored\nat the left edge.", 'justify'=>'center', 'tags'=>$tag_item ) TkcRectangle.new(cvs, '24.9c','13.9c','25.1c','14.1c') if $tk_version =~ /^4\.[01]/ TkcText.new(cvs, '25c', '14c', 'anchor'=>'c', 'font'=>font2, 'fill'=>red, |