Method: TkGoldberg_Demo#draw5
- Defined in:
-
sample/demos-en/goldberg.rb,
sample/demos-jp/goldberg.rb
Mouse
675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 |
# File 'sample/demos-en/goldberg.rb', line 675 def draw5 color = @C['5a'] color2 = @C['5b'] xy = [377, 248, 410, 248, 410, 465, 518, 465] # Mouse course xy.concat [518, 428, 451, 428, 451, 212, 377, 212] TkcPolygon.new(@canvas, xy, :fill=>color2, :outline=>@C['fg'], :width=>3) xy = [ 534.5, 445.5, 541, 440, 552, 436, 560, 436, 569, 440, 574, 446, 575, 452, 574, 454, 566, 456, 554, 456, 545, 456, 537, 454, 530, 452 ] TkcPolygon.new(@canvas, xy, :tag=>['I5', 'I5_0'], :fill=>color) TkcLine.new(@canvas, [573, 452, 592, 458, 601, 460, 613, 456], # Tail :tag=>['I5', 'I5_1'], :fill=>color, :smooth=>true, :width=>3) xy = box(540, 446, 2) # Eye xy = [540, 444, 541, 445, 541, 447, 540, 448, 538, 447, 538, 445] TkcPolygon.new(@canvas, xy, :tag=>['I5', 'I5_2'], :fill=>@C['bg'], :outline=>'', :smooth=>true) xy = [538, 454, 535, 461] # Front leg TkcLine.new(@canvas, xy, :tag=>['I5', 'I5_3'], :fill=>color, :width=>2) xy = [566, 455, 569, 462] # Back leg TkcLine.new(@canvas, xy, :tag=>['I5', 'I5_4'], :fill=>color, :width=>2) xy = [544, 455, 545, 460] # 2nd front leg TkcLine.new(@canvas, xy, :tag=>['I5', 'I5_5'], :fill=>color, :width=>2) xy = [560, 455, 558, 460] # 2nd back leg TkcLine.new(@canvas, xy, :tag=>['I5', 'I5_6'], :fill=>color, :width=>2) end |