135
'-1'=>[366, 207], '-2'=>[349, 204], '-3'=>[359, 193], '-4'=>[375, 192],
135
'-1'=>[366, 207], '-2'=>[349, 204], '-3'=>[359, 193], '-4'=>[375, 192],
136
136
'-5'=>[340, 190], '-6'=>[349, 177], '-7'=>[366, 177], '-8'=>[380, 176],
137
'-9'=>[332, 172], '-10'=>[342, 161], '-11'=>[357, 164],
138
'-12'=>[372, 163], '-13'=>[381, 149], '-14'=>[364, 151],
139
'-15'=>[349, 146], '-16'=>[333, 148], '0'=>[357, 219],
140
'1'=>[359, 261], '2'=>[359, 291], '3'=>[359, 318], '4'=>[361, 324],
141
'5'=>[365, 329], '6'=>[367, 334], '7'=>[367, 340], '8'=>[366, 346],
142
'9'=>[364, 350], '10'=>[361, 355], '11'=>[359, 370], '12'=>[359, 391],
143
'13,0'=>[360, 456], '13,1'=>[376, 456], '13,2'=>[346, 456],
144
'13,3'=>[330, 456], '13,4'=>[353, 444], '13,5'=>[368, 443],
145
'13,6'=>[339, 442], '13,7'=>[359, 431], '13,8'=>[380, 437],
146
'13,9'=>[345, 428], '13,10'=>[328, 434], '13,11'=>[373, 424],
147
'13,12'=>[331, 420], '13,13'=>[360, 417], '13,14'=>[345, 412],
137
'-9'=>[332, 172], '-10'=>[342, 161], '-11'=>[357, 164],
138
'-12'=>[372, 163], '-13'=>[381, 149], '-14'=>[364, 151],
139
'-15'=>[349, 146], '-16'=>[333, 148], '0'=>[357, 219],
140
'1'=>[359, 261], '2'=>[359, 291], '3'=>[359, 318], '4'=>[361, 324],
141
'5'=>[365, 329], '6'=>[367, 334], '7'=>[367, 340], '8'=>[366, 346],
142
'9'=>[364, 350], '10'=>[361, 355], '11'=>[359, 370], '12'=>[359, 391],
143
'13,0'=>[360, 456], '13,1'=>[376, 456], '13,2'=>[346, 456],
144
'13,3'=>[330, 456], '13,4'=>[353, 444], '13,5'=>[368, 443],
145
'13,6'=>[339, 442], '13,7'=>[359, 431], '13,8'=>[380, 437],
146
'13,9'=>[345, 428], '13,10'=>[328, 434], '13,11'=>[373, 424],
147
'13,12'=>[331, 420], '13,13'=>[360, 417], '13,14'=>[345, 412],
148
148
'13,15'=>[376, 410], '13,16'=>[360, 403]
216
216
def do_ctrl_frame
217
@start = Tk::Button.new(@parent, :text=>'Start', :bd=>6,
217
@start = Tk::Button.new(@parent, :text=>'Start', :bd=>6,
218
218
:command=>proc{do_button(0)})
219
219
if font = @start['font']
220
220
@start.font(font.weight('bold'))
223
@pause = TkCheckbutton.new(@parent, :text=>'Pause', :font=>font,
224
:command=>proc{do_button(1)}, :relief=>:raised,
223
@pause = TkCheckbutton.new(@parent, :text=>'Pause', :font=>font,
224
:command=>proc{do_button(1)}, :relief=>:raised,
225
225
:variable=>@S['pause'])
227
@step = TkButton.new(@parent, :text=>'Single Step', :font=>font,
227
@step = TkButton.new(@parent, :text=>'Single Step', :font=>font,
228
228
:command=>proc{do_button(2)})
229
@bstep = TkButton.new(@parent, :text=>'Big Step', :font=>font,
229
@bstep = TkButton.new(@parent, :text=>'Big Step', :font=>font,
230
230
:command=>proc{do_button(4)})
231
@reset = TkButton.new(@parent, :text=>'Reset', :font=>font,
231
@reset = TkButton.new(@parent, :text=>'Reset', :font=>font,
232
232
:command=>proc{do_button(3)})
234
234
@details = TkFrame.new(@parent, :bd=>2, :relief=>:ridge)
235
@detail = TkCheckbutton.new(@parent, :text=>'Details', :font=>font,
235
@detail = TkCheckbutton.new(@parent, :text=>'Details', :font=>font,
236
236
:relief=>:raised, :variable=>@S['details'])
238
@msg_entry = TkEntry.new(@parent, :textvariable=>@S['message'],
238
@msg_entry = TkEntry.new(@parent, :textvariable=>@S['message'],
239
239
:justify=>:center)
240
@speed_scale = TkScale.new(@parent, :orient=>:horizontal,
241
:from=>1, :to=>10, :font=>font,
242
:variable=>@S['speed'], :bd=>2,
240
@speed_scale = TkScale.new(@parent, :orient=>:horizontal,
241
:from=>1, :to=>10, :font=>font,
242
:variable=>@S['speed'], :bd=>2,
243
243
:relief=>:ridge, :showvalue=>false)
244
@about = TkButton.new(@parent, :text=>'About',
244
@about = TkButton.new(@parent, :text=>'About',
245
245
:command=>proc{about}, :font=>font)
247
247
Tk.grid(@start, :in=>@ctrl, :row=>0, :sticky=>:ew)
447
447
color2 = @C['1b']
448
TkcPolygon.new(@canvas,
449
[ 844, 133, 800, 133, 800, 346, 820, 346,
450
820, 168, 844, 168, 844, 133 ],
451
:width=>3, :fill=>color, :outline=>'')
452
TkcPolygon.new(@canvas,
453
[ 771, 133, 685, 133, 685, 168, 751, 168,
454
751, 346, 771, 346, 771, 133 ],
455
:width=>3, :fill=>color, :outline=>'')
456
TkcOval.new(@canvas, box(812, 122, 9),
448
TkcPolygon.new(@canvas,
449
[ 844, 133, 800, 133, 800, 346, 820, 346,
450
820, 168, 844, 168, 844, 133 ],
451
:width=>3, :fill=>color, :outline=>'')
452
TkcPolygon.new(@canvas,
453
[ 771, 133, 685, 133, 685, 168, 751, 168,
454
751, 346, 771, 346, 771, 133 ],
455
:width=>3, :fill=>color, :outline=>'')
456
TkcOval.new(@canvas, box(812, 122, 9),
457
457
:tag=>'I1', :fill=>color2, :outline=>'')
459
459
@canvas.itembind('I1', '1'){ start }
462
462
def move1(step = nil)
463
463
step = get_step(1, step)
465
[807, 122], [802, 122], [797, 123], [793, 124], [789, 129], [785, 153],
466
[785, 203], [785, 278, :x], [785, 367], [810, 392], [816, 438],
467
[821, 503], [824, 585, :y], [838, 587], [848, 593], [857, 601],
465
[807, 122], [802, 122], [797, 123], [793, 124], [789, 129], [785, 153],
466
[785, 203], [785, 278, :x], [785, 367], [810, 392], [816, 438],
467
[821, 503], [824, 585, :y], [838, 587], [848, 593], [857, 601],
470
470
return 0 if step >= pos.length
483
TkcPolygon.new(@canvas, [750, 369, 740, 392, 760, 392],
483
TkcPolygon.new(@canvas, [750, 369, 740, 392, 760, 392],
484
484
:fill=>@C['fg'], :outline=>@C['fg'])
487
TkcRectangle.new(@canvas, [628, 335, 660, 383],
487
TkcRectangle.new(@canvas, [628, 335, 660, 383],
488
488
:fill=>'', :outline=>@C['fg'])
491
TkcBitmap.new(@canvas, [628, yy], :bitmap=>'gray25',
491
TkcBitmap.new(@canvas, [628, yy], :bitmap=>'gray25',
492
492
:anchor=>:nw, :foreground=>@C['fg'])
493
TkcBitmap.new(@canvas, [644, yy], :bitmap=>'gray25',
493
TkcBitmap.new(@canvas, [644, yy], :bitmap=>'gray25',
494
494
:anchor=>:nw, :foreground=>@C['fg'])
498
TkcLine.new(@canvas, [702, 366, 798, 366],
498
TkcLine.new(@canvas, [702, 366, 798, 366],
499
499
:fill=>@C['fg'], :width=>6, :tag=>'I2_0')
502
TkcLine.new(@canvas, [712, 363, 712, 355],
502
TkcLine.new(@canvas, [712, 363, 712, 355],
503
503
:fill=>@C['fg'], :width=>3, :tag=>'I2_1')
506
TkcLine.new(@canvas, [705, 363, 705, 355],
506
TkcLine.new(@canvas, [705, 363, 705, 355],
507
507
:fill=>@C['fg'], :width=>3, :tag=>'I2_2')
510
TkcLine.new(@canvas, [679, 356, 679, 360, 717, 360, 717, 356, 679, 356],
510
TkcLine.new(@canvas, [679, 356, 679, 360, 717, 360, 717, 356, 679, 356],
511
511
:fill=>@C['fg'], :width=>3, :tag=>'I2_3')
514
TkcPolygon.new(@canvas,
515
[ 671, 352, 677.4, 353.9, 680, 358.5, 677.4, 363.1,
516
671, 365, 664.6, 363.1, 662, 358.5, 664.6, 353.9 ],
514
TkcPolygon.new(@canvas,
515
[ 671, 352, 677.4, 353.9, 680, 358.5, 677.4, 363.1,
516
671, 365, 664.6, 363.1, 662, 358.5, 664.6, 353.9 ],
517
517
:fill=>color, :outline=>color, :tag=>'I2_4')
523
523
stages = [0, 0, 1, 2, 0, 2, 1, 0, 1, 2, 0, 2, 1]
526
686, 333, 692, 323, 682, 316, 674, 309, 671, 295, 668, 307,
526
686, 333, 692, 323, 682, 316, 674, 309, 671, 295, 668, 307,
527
527
662, 318, 662, 328, 671, 336
530
687, 331, 698, 322, 703, 295, 680, 320, 668, 297, 663, 311,
530
687, 331, 698, 322, 703, 295, 680, 320, 668, 297, 663, 311,
531
531
661, 327, 671, 335
534
686, 331, 704, 322, 688, 300, 678, 283, 678, 283, 674, 298,
534
686, 331, 704, 322, 688, 300, 678, 283, 678, 283, 674, 298,
535
535
666, 309, 660, 324, 672, 336
568
568
xy = [ [602, 296], [577, 174], [518, 174] ]
569
569
xy.each{|x, y| # 3 Pulleys
570
TkcOval.new(@canvas, box(x, y, 13),
570
TkcOval.new(@canvas, box(x, y, 13),
571
571
:fill=>color, :outline=>@C['fg'], :width=>3)
572
572
TkcOval.new(@canvas, box(x, y, 2), :fill=>@C['fg'], :outline=>@C['fg'])
576
TkcLine.new(@canvas, [750, 309, 670, 309], :tag=>'I3_s',
576
TkcLine.new(@canvas, [750, 309, 670, 309], :tag=>'I3_s',
577
577
:width=>3, :fill=>@C['fg'], :smooth=>true)
579
579
# Flame to pulley 1
580
TkcLine.new(@canvas, [670, 309, 650, 309], :tag=>'I3_0',
580
TkcLine.new(@canvas, [670, 309, 650, 309], :tag=>'I3_0',
581
581
:width=>3, :fill=>@C['fg'], :smooth=>true)
582
TkcLine.new(@canvas, [650, 309, 600, 309], :tag=>'I3_1',
582
TkcLine.new(@canvas, [650, 309, 600, 309], :tag=>'I3_1',
583
583
:width=>3, :fill=>@C['fg'], :smooth=>true)
585
585
# Pulley 1 half way to 2
586
TkcLine.new(@canvas, [589, 296, 589, 235], :tag=>'I3_2',
586
TkcLine.new(@canvas, [589, 296, 589, 235], :tag=>'I3_2',
587
587
:width=>3, :fill=>@C['fg'])
589
589
# Pulley 1 other half to 2
593
593
TkcLine.new(@canvas, [577, 161, 518, 161], :width=>3, :fill=>@C['fg'])
596
TkcLine.new(@canvas, [505, 174, 505, 205], :tag=>'I3_w',
596
TkcLine.new(@canvas, [505, 174, 505, 205], :tag=>'I3_w',
597
597
:width=>3, :fill=>@C['fg'])
599
599
# Draw the weight as 2 circles, two rectangles and 1 rounded rectangle
600
600
x1, y1, x2, y2 = [515, 207, 495, 207]
601
TkcOval.new(@canvas, box(x1, y1, 6),
602
:tag=>'I3_', :fill=>color2, :outline=>color2)
603
TkcOval.new(@canvas, box(x2, y2, 6),
604
:tag=>'I3_', :fill=>color2, :outline=>color2)
605
TkcRectangle.new(@canvas, x1, y1 - 6, x2, y2 + 6,
601
TkcOval.new(@canvas, box(x1, y1, 6),
602
:tag=>'I3_', :fill=>color2, :outline=>color2)
603
TkcOval.new(@canvas, box(x2, y2, 6),
604
:tag=>'I3_', :fill=>color2, :outline=>color2)
605
TkcRectangle.new(@canvas, x1, y1 - 6, x2, y2 + 6,
606
606
:tag=>'I3_', :fill=>color2, :outline=>color2)
608
TkcPolygon.new(@canvas, round_rect([492, 220, 518, 263], 15),
608
TkcPolygon.new(@canvas, round_rect([492, 220, 518, 263], 15),
609
609
:smooth=>true, :tag=>'I3_', :fill=>color2, :outline=>color2)
611
TkcLine.new(@canvas, [500, 217, 511, 217],
611
TkcLine.new(@canvas, [500, 217, 511, 217],
612
612
:tag=>'I3_', :fill=>color2, :width=>10)
614
614
# Bottom weight target
615
TkcLine.new(@canvas, [502, 393, 522, 393, 522, 465],
615
TkcLine.new(@canvas, [502, 393, 522, 393, 522, 465],
616
616
:tag=>'I3__', :fill=>@C['fg'], :joinstyle=>:miter, :width=>10)
712
712
step = get_step(5, step)
715
[553, 452], [533, 452], [513, 452], [493, 452], [473, 452],
716
[463, 442, 30], [445.5, 441.5, 30], [425.5, 434.5, 30], [422, 414],
717
[422, 394], [422, 374], [422, 354], [422, 334], [422, 314], [422, 294],
715
[553, 452], [533, 452], [513, 452], [493, 452], [473, 452],
716
[463, 442, 30], [445.5, 441.5, 30], [425.5, 434.5, 30], [422, 414],
717
[422, 394], [422, 374], [422, 354], [422, 334], [422, 314], [422, 294],
718
718
[422, 274, -30], [422, 260.5, -30, :x], [422.5, 248.5, -28], [425, 237]
736
736
xy = [324, 130, 391, 204] # Ball holder
737
737
xy = round_rect(xy, 10)
738
TkcPolygon.new(@canvas, xy, :smooth=>true,
738
TkcPolygon.new(@canvas, xy, :smooth=>true,
739
739
:outline=>@C['fg'], :width=>3, :fill=>color)
740
740
xy = [339, 204, 376, 253] # Below the ball holder
741
TkcRectangle.new(@canvas, xy, :outline=>@C['fg'], :width=>3,
741
TkcRectangle.new(@canvas, xy, :outline=>@C['fg'], :width=>3,
742
742
:fill=>color, :tag=>'I6c')
743
743
xy = box(346, 339, 28)
744
744
TkcOval.new(@canvas, xy, :fill=>color, :outline=>'') # Roter
745
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>2, :style=>:arc,
745
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>2, :style=>:arc,
746
746
:start=>80, :extent=>205)
747
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>2, :style=>:arc,
747
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>2, :style=>:arc,
748
748
:start=>-41, :extent=>85)
750
750
xy = box(346, 339, 15) # Center of rotor
855
855
xy = [198, 306, 277, 374] # Box
856
TkcRectangle.new(@canvas, xy, :outline=>@C['fg'], :width=>2,
856
TkcRectangle.new(@canvas, xy, :outline=>@C['fg'], :width=>2,
857
857
:fill=>color, :tag=>'I7z')
858
858
@canvas.lower('I7z')
859
859
xy = [275, 343, 230, 349]
860
TkcLine.new(@canvas, xy, :tag=>'I7', :fill=>@C['fg'], :arrow=>:last,
860
TkcLine.new(@canvas, xy, :tag=>'I7', :fill=>@C['fg'], :arrow=>:last,
861
861
:arrowshape=>[23, 23, 8], :width=>6)
862
862
xy = [225, 324] # On button
864
864
TkcOval.new(@canvas, box(x, y, 3), :fill=>@C['fg'], :outline=>@C['fg'])
865
865
xy = [218, 323] # On text
866
866
font = ['Times Roman', 8]
867
TkcText.new(@canvas, xy, :text=>'on', :anchor=>:e,
867
TkcText.new(@canvas, xy, :text=>'on', :anchor=>:e,
868
868
:fill=>@C['fg'], :font=>font)
869
869
xy = [225, 350] # Off button
871
871
TkcOval.new(@canvas, box(x, y, 3), :fill=>@C['fg'], :outline=>@C['fg'])
872
872
xy = [218, 349] # Off text
873
TkcText.new(@canvas, xy, :text=>'off', :anchor=>:e,
873
TkcText.new(@canvas, xy, :text=>'off', :anchor=>:e,
874
874
:fill=>@C['fg'], :font=>font)
924
924
TkcPolygon.new(@canvas, xy, :fill=>color)
926
926
xy = [255, 206, 265, 234] # Fan blades
927
TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
927
TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
928
928
:width=>3, :tag=>'I9_0')
929
929
xy = [255, 176, 265, 204]
930
TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
930
TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
931
931
:width=>3, :tag=>'I9_0')
932
932
xy = [255, 206, 265, 220]
933
TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
933
TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
934
934
:width=>1, :tag=>'I9_1')
935
935
xy = [255, 190, 265, 204]
936
TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
936
TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
937
937
:width=>1, :tag=>'I9_1')
958
958
color = @C['10a']
959
959
color2 = @C['10b']
960
960
xy = [191, 230, 233, 230, 233, 178, 191, 178] # Sail
961
TkcPolygon.new(@canvas, xy, :fill=>color, :width=>3, :outline=>@C['fg'],
961
TkcPolygon.new(@canvas, xy, :fill=>color, :width=>3, :outline=>@C['fg'],
963
963
xy = box(209, 204, 31) # Front
964
TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :style=>:pie,
964
TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :style=>:pie,
965
965
:start=>120, :extent=>120, :tag=>'I10')
966
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
966
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
967
967
:start=>120, :extent=>120, :tag=>'I10')
968
968
xy = box(249, 204, 31) # Back
969
TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>3,
969
TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>3,
970
970
:style=>:pie, :start=>120, :extent=>120, :tag=>'I10')
971
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
971
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
972
972
:start=>120, :extent=>120, :tag=>'I10')
974
974
xy = [200, 171, 200, 249] # Mast
999
999
step = get_step(10, step)
1002
[195, 212], [193, 212], [190, 212], [186, 212], [181, 212], [176, 212],
1003
[171, 212], [166, 212], [161, 212], [156, 212], [151, 212], [147, 212],
1004
[142, 212], [137, 212], [132, 212, :x], [127, 212], [121, 212],
1002
[195, 212], [193, 212], [190, 212], [186, 212], [181, 212], [176, 212],
1003
[171, 212], [166, 212], [161, 212], [156, 212], [151, 212], [147, 212],
1004
[142, 212], [137, 212], [132, 212, :x], [127, 212], [121, 212],
1005
1005
[116, 212], [111, 212]
1028
1028
xy = [55, 504, 55, 591] # Bottom right side
1029
1029
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
1030
1030
xy = box(71, 460, 48) # Outer loop
1031
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
1031
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
1032
1032
:start=>110, :extent=>-290, :tag=>'I11i')
1033
1033
xy = box(71, 460, 16) # Inner loop
1034
TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>'',
1034
TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>'',
1035
1035
:width=>3, :tag=>'I11i')
1036
1036
TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>@C['bg'], :width=>3)
1038
1038
xy = [23, 264, 23, 591] # Left side
1039
1039
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
1040
1040
xy = box(1, 266, 23) # Top left curve
1041
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3,
1041
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3,
1042
1042
:style=>:arc, :extent=>90)
1044
1044
xy = box(75, 235, 9) # The ball
1045
TkcOval.new(@canvas, xy, :fill=>color2, :outline=>'',
1045
TkcOval.new(@canvas, xy, :fill=>color2, :outline=>'',
1046
1046
:width=>3, :tag=>'I11')
1050
1050
step = get_step(11, step)
1053
[75, 235], [70, 235], [65, 237], [56, 240], [46, 247], [38, 266],
1054
[38, 296], [38, 333], [38, 399], [38, 475], [74, 496], [105, 472],
1053
[75, 235], [70, 235], [65, 237], [56, 240], [46, 247], [38, 266],
1054
[38, 296], [38, 333], [38, 399], [38, 475], [74, 496], [105, 472],
1055
1055
[100, 437], [65, 423], [-100, -100], [38, 505], [38, 527, :x], [38, 591]
1068
20, 637, 20, 617, 20, 610, 20, 590, 40, 590, 40, 590,
1068
20, 637, 20, 617, 20, 610, 20, 590, 40, 590, 40, 590,
1069
1069
60, 590, 60, 610, 60, 610
1071
1071
xy.concat([60, 610, 65, 620, 60, 631]) # Thumb
1072
xy.concat([60, 631, 60, 637, 60, 662, 60, 669, 52, 669,
1072
xy.concat([60, 631, 60, 637, 60, 662, 60, 669, 52, 669,
1073
1073
56, 669, 50, 669, 50, 662, 50, 637])
1075
1075
y0 = 637 # Bumps for fingers
1104
1104
radii = [2, 9, 9, 8, 5, 5, 2]
1106
round_poly(@canvas, xy, radii, :width=>3,
1106
round_poly(@canvas, xy, radii, :width=>3,
1107
1107
:outline=>@C['fg'], :fill=>color)
1108
round_poly(@canvas, xy2, radii, :width=>3,
1108
round_poly(@canvas, xy2, radii, :width=>3,
1109
1109
:outline=>@C['fg'], :fill=>color)
1113
TkcRectangle.new(@canvas, box(x, y, 4), :fill=>'', :outline=>@C['fg'],
1113
TkcRectangle.new(@canvas, box(x, y, 4), :fill=>'', :outline=>@C['fg'],
1114
1114
:width=>3, :tag=>'I13')
1115
1115
xy = [809, 677]
1117
TkcRectangle.new(@canvas, box(x, y, 4), :fill=>'', :outline=>@C['fg'],
1117
TkcRectangle.new(@canvas, box(x, y, 4), :fill=>'', :outline=>@C['fg'],
1118
1118
:width=>3, :tag=>'I13R')
1120
1120
xy = [112, 687] # Label
1121
TkcText.new(@canvas, xy, :text=>'FAX', :fill=>@C['fg'],
1121
TkcText.new(@canvas, xy, :text=>'FAX', :fill=>@C['fg'],
1122
1122
:font=>['Times Roman', 12, :bold])
1123
1123
xy = [762, 687]
1124
TkcText.new(@canvas, xy, :text=>'FAX', :fill=>@C['fg'],
1124
TkcText.new(@canvas, xy, :text=>'FAX', :fill=>@C['fg'],
1125
1125
:font=>['Times Roman', 12, :bold])
1127
1127
xy = [138, 663, 148, 636, 178, 636] # Paper guide
1160
1160
color = @C['14']
1161
1161
xy = [102, 661, 113, 632, 130, 618] # Left paper edge
1162
TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
1162
TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
1163
1163
:width=>3, :tag=>'I14L_0')
1164
1164
xy = [148, 629, 125, 640, 124, 662] # Right paper edge
1165
TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
1165
TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
1166
1166
:width=>3, :tag=>'I14L_1')
1170
1170
768.0, 662.5, 767.991316225, 662.433786215, 767.926187912, 662.396880171
1172
TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
1172
TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
1173
1173
:width=>3, :tag=>'I14R_0')
1174
1174
@canvas.lower('I14R_0')
1175
1175
# NB. these numbers are VERY sensitive, you must start with final size
1325
1325
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
1327
1327
xy = [664, 523, 717, 549] # Body
1328
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :fill=>color, :width=>3,
1328
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :fill=>color, :width=>3,
1329
1329
:style=>:chord, :start=>128, :extent=>260, :tag=>'I17')
1331
1331
xy = [709, 554, 690, 543] # Paw
1332
TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>color,
1332
TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>color,
1333
1333
:width=>3, :tag=>'I17')
1334
1334
xy = [657, 544, 676, 555]
1335
TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>color,
1335
TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>color,
1336
1336
:width=>3, :tag=>'I17')
1338
1338
xy = box(660, 535, 15) # Lower face
1339
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
1339
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
1340
1340
:start=>150, :extent=>240, :tag=>'I17_')
1341
TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
1341
TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
1342
1342
:style=>:chord, :start=>150, :extent=>240, :tag=>'I17_')
1343
1343
xy = [674, 529, 670, 513, 662, 521, 658, 521, 650, 513, 647, 529] # Ears
1344
1344
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
1345
TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>'', :width=>1,
1345
TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>'', :width=>1,
1346
1346
:tag=>['I17_', 'I17_c'])
1347
1347
xy = [652, 542, 628, 539] # Whiskers
1348
1348
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
1352
1352
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
1354
1354
xy = [668, 543, 687, 538]
1355
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
1355
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
1356
1356
:tag=>['I17_', 'I17_w'])
1357
1357
xy = [668, 544, 688, 546]
1358
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
1358
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
1359
1359
:tag=>['I17_', 'I17_w'])
1360
1360
xy = [668, 547, 688, 553]
1361
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
1361
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
1362
1362
:tag=>['I17_', 'I17_w'])
1364
1364
xy = [649, 530, 654, 538, 659, 530] # Left eye
1365
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2,
1365
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2,
1366
1366
:smooth=>true, :tag=>'I17')
1367
1367
xy = [671, 530, 666, 538, 661, 530] # Right eye
1368
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2,
1368
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2,
1369
1369
:smooth=>true, :tag=>'I17')
1370
1370
xy = [655, 543, 660, 551, 665, 543] # Mouth
1371
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2,
1371
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2,
1372
1372
:smooth=>true, :tag=>'I17')
1394
1394
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
1397
675, 506, 694, 489, 715, 513, 715, 513, 715, 513, 716, 525,
1398
716, 525, 716, 525, 706, 530, 695, 530, 679, 535, 668, 527,
1397
675, 506, 694, 489, 715, 513, 715, 513, 715, 513, 716, 525,
1398
716, 525, 716, 525, 706, 530, 695, 530, 679, 535, 668, 527,
1399
1399
668, 527, 668, 527, 675, 522, 676, 517, 677, 512
1401
TkcPolygon.new(@canvas, xy, :fill=>@canvas.itemcget('I17_c', :fill),
1402
:outline=>@C['fg'], :width=>3, :smooth=>true,
1401
TkcPolygon.new(@canvas, xy, :fill=>@canvas.itemcget('I17_c', :fill),
1402
:outline=>@C['fg'], :width=>3, :smooth=>true,
1404
1404
xy = [716, 514, 716, 554] # Back leg
1405
1405
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
1406
1406
xy = [694, 532, 694, 554] # 2nd back leg
1407
1407
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
1408
1408
xy = [715, 514, 718, 506, 719, 495, 716, 488] # Tail
1409
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
1409
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
1410
1410
:smooth=>true, :tag=>'I17_')
1412
1412
@canvas.raise('I17w') # Make whiskers visible
1435
1435
step = get_step(18, step)
1438
[587, 506], [537, 506], [466, 506], [376, 506], [266, 506, :x],
1438
[587, 506], [537, 506], [466, 506], [376, 506], [266, 506, :x],
1439
1439
[136, 506], [16, 506], [-100, -100]
1443
1443
b[0] = [490, 502, 719, 507, 524, 512] # Band collapsing
1445
491, 503, 524, 557, 563, 505, 559, 496, 546, 506, 551, 525,
1445
491, 503, 524, 557, 563, 505, 559, 496, 546, 506, 551, 525,
1446
1446
553, 536, 538, 534, 532, 519, 529, 499
1473
1473
color = @C['19']
1474
1474
xx = [[249, 181], [155, 118], [86, 55], [22, 0]]
1475
1475
xx.each{|x1, x2|
1476
TkcRectangle.new(@canvas, x1, 453, x2, 467,
1476
TkcRectangle.new(@canvas, x1, 453, x2, 467,
1477
1477
:fill=>color, :outline=>'', :tag=>'I19')
1478
TkcLine.new(@canvas, x1, 453, x2, 453,
1478
TkcLine.new(@canvas, x1, 453, x2, 453,
1479
1479
:fill=>@C['fg'], :width=>1) # Pipe top
1480
TkcLine.new(@canvas, x1, 467, x2, 467,
1480
TkcLine.new(@canvas, x1, 467, x2, 467,
1481
1481
:fill=>@C['fg'], :width=>1) # Pipe bottom
1483
1483
@canvas.raise('I11i')
1485
1485
xy = box(168, 460, 16) # Bulge by the joint
1486
1486
TkcOval.new(@canvas, xy, :fill=>color, :outline=>'')
1487
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, :style=>:arc,
1487
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, :style=>:arc,
1488
1488
:start=>21, :extent=>136)
1489
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, :style=>:arc,
1489
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, :style=>:arc,
1490
1490
:start=>-21, :extent=>-130)
1492
1492
xy = [249, 447, 255, 473] # First joint 26x6
1493
1493
TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1)
1495
1495
xy = box(257, 433, 34) # Bend up
1496
TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
1496
TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
1497
1497
:style=>:pie, :start=>0, :extent=>-91)
1498
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
1498
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
1499
1499
:style=>:arc, :start=>0, :extent=>-90)
1500
1500
xy = box(257, 433, 20)
1501
TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1,
1501
TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1,
1502
1502
:style=>:pie, :start=>0, :extent=>-92)
1503
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
1503
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
1504
1504
:style=>:arc, :start=>0, :extent=>-90)
1505
1505
xy = box(257, 421, 34) # Bend left
1506
TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
1506
TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
1507
1507
:style=>:pie, :start=>0, :extent=>91)
1508
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
1508
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
1509
1509
:style=>:arc, :start=>0, :extent=>90)
1510
1510
xy = box(257, 421, 20)
1511
TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1,
1511
TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1,
1512
1512
:style=>:pie, :start=>0, :extent=>90)
1513
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
1513
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
1514
1514
:style=>:arc, :start=>0, :extent=>90)
1515
1515
xy = box(243, 421, 34) # Bend down
1516
TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
1516
TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
1517
1517
:style=>:pie, :start=>90, :extent=>90)
1518
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
1518
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
1519
1519
:style=>:arc, :start=>90, :extent=>90)
1520
1520
xy = box(243, 421, 20)
1521
TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1,
1521
TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1,
1522
1522
:style=>:pie, :start=>90, :extent=>90)
1523
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
1523
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
1524
1524
:style=>:arc, :start=>90, :extent=>90)
1526
1526
xy = [270, 427, 296, 433] # 2nd joint bottom
1579
1579
color = @C['20']
1580
1580
@canvas.delete('I20')
1582
sine([208, 428, 208, y], 4, f, :tag=>['I20', 'I20s'],
1582
sine([208, 428, 208, y], 4, f, :tag=>['I20', 'I20s'],
1583
1583
:width=>3, :fill=>color, :smooth=>true)
1584
TkcLine.new(@canvas, @canvas.coords('I20s'), :width=>3,
1584
TkcLine.new(@canvas, @canvas.coords('I20s'), :width=>3,
1585
1585
:fill=>color, :smooth=>1, :tag=>['I20', 'I20a'])
1586
TkcLine.new(@canvas, @canvas.coords('I20s'), :width=>3,
1586
TkcLine.new(@canvas, @canvas.coords('I20s'), :width=>3,
1587
1587
:fill=>color, :smooth=>1, :tag=>['I20', 'I20b'])
1588
1588
@canvas.move('I20a', 8, 0)
1589
1589
@canvas.move('I20b', 16, 0)
1600
1600
xy = [245, 490, 237, 535] # Right side
1601
1601
xy2 = [189, 535, 181, 490] # Left side
1602
TkcPolygon.new(@canvas, xy + xy2, :fill=>color, :outline=>'',
1602
TkcPolygon.new(@canvas, xy + xy2, :fill=>color, :outline=>'',
1603
1603
:tag=>['I21', 'I21f'])
1604
1604
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2, :tag=>'I21')
1605
1605
TkcLine.new(@canvas, xy2, :fill=>@C['fg'], :width=>2, :tag=>'I21')
1607
1607
xy = [182, 486, 244, 498] # Top
1608
TkcOval.new(@canvas, xy, :fill=>color, :outline=>'', :width=>2,
1608
TkcOval.new(@canvas, xy, :fill=>color, :outline=>'', :width=>2,
1609
1609
:tag=>['I21', 'I21f'])
1610
TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], :width=>2,
1610
TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], :width=>2,
1611
1611
:tag=>['I21', 'I21t'])
1612
1612
xy = [189, 532, 237, 540] # Bottom
1613
TkcOval.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>2,
1613
TkcOval.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>2,
1614
1614
:tag=>['I21', 'I21b'])
1669
1669
color3 = @C['23c']
1671
1671
xy = [185, 623, 253, 650] # Block
1672
TkcRectangle.new(@canvas, xy, :fill=>'black', :outline=>@C['fg'],
1672
TkcRectangle.new(@canvas, xy, :fill=>'black', :outline=>@C['fg'],
1673
1673
:width=>2, :tag=>'I23a')
1674
1674
xy = [187, 592, 241, 623] # Balloon
1675
1675
TkcOval.new(@canvas, xy, :outline=>'', :fill=>color, :tag=>'I23b')
1676
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :tag=>'I23b',
1676
TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :tag=>'I23b',
1677
1677
:style=>:arc, :start=>12, :extent=>336)
1678
1678
xy = [239, 604, 258, 589, 258, 625, 239, 610] # Balloon nozzle
1679
1679
TkcPolygon.new(@canvas, xy, :outline=>'', :fill=>color, :tag=>'I23b')
1680
1680
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I23b')
1682
1682
xy = [285, 611, 250, 603] # Dart body
1683
TkcOval.new(@canvas, xy, :fill=>color2, :outline=>@C['fg'],
1683
TkcOval.new(@canvas, xy, :fill=>color2, :outline=>@C['fg'],
1684
1684
:width=>3, :tag=>'I23d')
1685
1685
xy = [249, 596, 249, 618, 264, 607, 249, 596] # Dart tail
1686
TkcPolygon.new(@canvas, xy, :fill=>color3, :outline=>@C['fg'],
1686
TkcPolygon.new(@canvas, xy, :fill=>color3, :outline=>@C['fg'],
1687
1687
:width=>3, :tag=>'I23d')
1688
1688
xy = [249, 607, 268, 607] # Dart detail
1689
1689
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I23d')
1724
1724
:width=>3, :tag=>'I24')
1726
1726
xy = [387, 567, 390, 549, 404, 542] # Reflections
1727
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
1727
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
1728
1728
:width=>2, :tag=>'I24')
1729
1729
xy = [395, 568, 399, 554, 413, 547]
1730
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
1730
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
1731
1731
:width=>2, :tag=>'I24')
1732
1732
xy = [403, 570, 396, 555, 381, 553]
1733
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
1733
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
1734
1734
:width=>2, :tag=>'I24')
1735
1735
xy = [408, 564, 402, 547, 386, 545]
1736
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
1736
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
1737
1737
:width=>2, :tag=>'I24')
1747
1747
@canvas.delete('I24') # Exploding balloon
1749
347, 465, 361, 557, 271, 503, 272, 503, 342, 574, 259, 594,
1750
259, 593, 362, 626, 320, 737, 320, 740, 398, 691, 436, 738,
1751
436, 739, 476, 679, 528, 701, 527, 702, 494, 627, 548, 613,
1752
548, 613, 480, 574, 577, 473, 577, 473, 474, 538, 445, 508,
1749
347, 465, 361, 557, 271, 503, 272, 503, 342, 574, 259, 594,
1750
259, 593, 362, 626, 320, 737, 320, 740, 398, 691, 436, 738,
1751
436, 739, 476, 679, 528, 701, 527, 702, 494, 627, 548, 613,
1752
548, 613, 480, 574, 577, 473, 577, 473, 474, 538, 445, 508,
1753
1753
431, 441, 431, 440, 400, 502, 347, 465, 347, 465
1755
TkcPolygon.new(@canvas, xy, :tag=>'I24', :fill=>@C['24b'],
1755
TkcPolygon.new(@canvas, xy, :tag=>'I24', :fill=>@C['24b'],
1756
1756
:outline=>@C['24a'], :width=>10, :smooth=>true)
1757
1757
msg = Tk.subst(@S['message'].value)
1758
TkcText.new(@canvas, centroid('I24'), :text=>msg, :tag=>['I24', 'I24t'],
1758
TkcText.new(@canvas, centroid('I24'), :text=>msg, :tag=>['I24', 'I24t'],
1759
1759
:justify=>:center, :font=>['Times Roman', 18, :bold])