%! % Date: Wed, 21 Dec 88 21:15:36 EST % To: NeWS-makers@brillig.umd.edu % Subject: A NeWS Stocking Stuffer % From: rberlin@sun.com (Rich Berlin) % % Here's a little toy for Christmas. Enjoy. % % -- Rich % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % o % Happy Holidays from: / \ % %%%%%%% % Sun Microsystems' ( o o ) % Corporate Demo Group (% \ %) % 2550 Garcia Ave \%V%/ % Mountain View, CA 94043 % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Mistletoe, in its own window. Figuring out how to get MOTAS to stand % under it is up to you (but please see bugs list below). % % Bugs (innocuous, as far as I can tell): % % % o It sometimes gets confused about where to put the window when you % move it. If this is the case, change the position-offset % from 0 to 192. % % o The transparent parts of the window don't always update properly, so % depending or what's in your user.ps, it may not look so great. % (In mine, the framebuffer is retained, but the windows aren't. % Perhaps that will help.) % % o Can't shrink or grow (I know how to do it, but my green thumb is sore.) % % o The window outline clips too much of the picture. It looked better % as raw graphics than it does as a window. % % o The mouse interest should really be *under* the mistletoe, % not *on* it, but that just seemed too difficult to implement. % (For the curious, move the mouse so that it crosses the sprig.) % % o The /move message seems to work sporadically when sent to a member % of TheAppropriateSex; also, some members of that class moveto % beneath the mistletoe without being sent any message at all! % Maybe a problem with the method I'm using, but the instances % of the subclass I'm dealing with don't always exhibit % predictable behavior, so I can't be certain. I'm especially % confused because it appears that members respond differently % depending on who sends the message. I'm afraid you're on your own % with this one--sorry. % % Author: Richard Berlin 21 December 1988 % /position-offset 0 def %%%% Utilities %%%% % Concatenate two arrays. If either one is executable, the result % will be, too. /array-concat { % array1 array2 => concatenated array 2 copy xcheck exch xcheck or 3 1 roll cvlit exch cvlit exch 2 copy length exch length add array % exec? a1 a2 new dup dup 5 3 roll % new new new a1 a2 2 copy pop length exch % new new new a1 sizeof(a1) a2 4 -1 roll 3 1 roll putinterval 0 exch putinterval exch {cvx} if } def % Remove an item from a menu /remove-menu-item { % key menu => - dup 3 1 roll /searchkey exch send { /deleteitem 3 -1 roll send} { pop } ifelse } def /mistletoe-sprig-path { 83.6667 73 moveto 81.4444 71.7222 83.5556 72.8889 84.3333 74 curveto 85.1111 75.1111 87.4445 75.9444 88.3333 79.6667 curveto 89.2222 83.3889 88.6667 93.8889 89.6667 96.3333 curveto 90.6667 98.7778 93.9444 93.7222 94.3333 94.3333 curveto 94.7222 94.9444 91.5 97.7222 92 100 curveto 92.5 102.278 95.6111 109 97.3333 108 curveto 99.0556 107 102.278 98.3889 102.333 94 curveto 102.389 89.6111 100.778 85.1667 97.6667 81.6667 curveto 94.5555 78.1667 85.8889 74.2778 83.6667 73 curveto 75.6667 69.6667 moveto 77.3889 69.5556 77.8889 70.2222 75.6667 70 curveto 73.4444 69.7778 68.2222 66.6111 62.3333 68.3333 curveto 56.4444 70.0556 44.1111 76.1111 40.3333 80.3333 curveto 36.5556 84.5556 37.7222 93.9444 39.6667 93.6667 curveto 41.6111 93.3889 47.7222 82.5 52 78.6667 curveto 56.2778 74.8333 63.1111 72 65.3333 70.6667 curveto 67.5556 69.3333 63.6111 70.8333 65.3333 70.6667 curveto 67.0556 70.5 73.9444 69.7778 75.6667 69.6667 curveto 77.3333 115 moveto 76.1111 112.944 78.3889 114.167 77 115.333 curveto 75.6111 116.5 70.6667 118.556 69 122 curveto 67.3333 125.444 65.5556 132.056 67 136 curveto 68.4444 139.944 75.3333 144.167 77.6667 145.667 curveto 80 147.167 79.8889 148 81 145 curveto 82.1111 142 84.9444 132.667 84.3333 127.667 curveto 83.7222 122.667 78.5556 117.056 77.3333 115 curveto 82 142 moveto 81.7778 141.556 80 140.444 82 142 curveto 84 143.556 90.7222 146 94 151.333 curveto 97.2778 156.667 100.667 170.444 101.667 174 curveto 102.667 177.556 101.222 176.167 100 172.667 curveto 98.7778 169.167 97.1111 157.667 94.3333 153 curveto 91.5556 148.333 85.3889 146.5 83.3333 144.667 curveto 81.2778 142.833 82.2222 142.444 82 142 curveto 90.3333 167 moveto 91.0556 165 89.2222 165.833 90.3333 167 curveto 91.4444 168.167 95.5556 170.389 97 174 curveto 98.4444 177.611 99.7778 185.944 99 188.667 curveto 98.2222 191.389 94.5 191.944 92.3333 190.333 curveto 90.1667 188.722 86.3333 182.889 86 179 curveto 85.6667 175.111 89.6111 169 90.3333 167 curveto 77.3333 146.667 moveto 79.2222 145.778 78.0556 146.167 77 147 curveto 75.9444 147.833 72.3889 148.444 71 151.667 curveto 69.6111 154.889 69 162.167 68.6667 166.333 curveto 68.3333 170.5 69.7222 176.611 69 176.667 curveto 68.2778 176.722 64.8889 170.722 64.3333 166.667 curveto 63.7778 162.611 63.5 155.667 65.6667 152.333 curveto 67.8333 149 75.4444 147.556 77.3333 146.667 curveto 37.3333 128 moveto 36.7778 126.667 36 126.667 37.6667 128 curveto 39.3333 129.333 45.5 132.222 47.3333 136 curveto 49.1667 139.778 49.5556 147.278 48.6667 150.667 curveto 47.7778 154.056 43.3333 157.778 42 156.333 curveto 40.6667 154.889 40.8333 145.389 40.6667 142 curveto 40.5 138.611 41.5556 138.333 41 136 curveto 40.4444 133.667 37.8889 129.333 37.3333 128 curveto 42.6667 101 moveto 43.5556 100.333 41.3333 101.778 40 102.333 curveto 38.6667 102.889 36.3889 102.611 34.6667 104.333 curveto 32.9444 106.056 30 109.5 29.6667 112.667 curveto 29.3333 115.833 31.4444 121.611 32.6667 123.333 curveto 33.8889 125.056 36.9444 124.611 37 123 curveto 37.0556 121.389 33.3889 116.444 33 113.667 curveto 32.6111 110.889 33.0556 108.444 34.6667 106.333 curveto 36.2778 104.222 41.7778 101.667 42.6667 101 curveto 31.6667 130.667 moveto 31.0556 131.056 32.7222 129.5 31.3333 131 curveto 29.9444 132.5 24.3333 135.889 23.3333 139.667 curveto 22.3333 143.444 24 150.389 25.3333 153.667 curveto 26.6667 156.944 30.3333 159.222 31.3333 159.333 curveto 32.3333 159.444 31.6667 158.111 31.3333 154.333 curveto 31 150.556 28.7222 140.944 29.3333 136.667 curveto 29.9444 132.389 34.6111 129.667 35 128.667 curveto 35.3889 127.667 32.2778 130.278 31.6667 130.667 curveto 84.6667 180.333 moveto 84.9444 179.278 86.2778 179.611 84.6667 180.333 curveto 83.0556 181.056 76.6667 183.056 75 184.667 curveto 73.3333 186.278 73.8333 189.222 74.6667 190 curveto 75.5 190.778 78.6111 189.889 80 189.333 curveto 81.3889 188.778 82.2222 188.167 83 186.667 curveto 83.7778 185.167 84.3889 181.389 84.6667 180.333 curveto 100 177.333 moveto 99.8889 176.333 99.1667 176.333 100 177.333 curveto 100.833 178.333 104.167 182 105 183.333 curveto 105.833 184.667 105.722 185.333 105 185.333 curveto 104.278 185.333 101.389 183.667 100.667 183.333 curveto 99.9444 183 100.778 184.333 100.667 183.333 curveto 100.556 182.333 100.111 178.333 100 177.333 curveto 80.6667 115 moveto 81.6111 114.833 79.4444 112.222 80.6667 115.333 curveto 81.8889 118.444 87.5 129.5 88 133.667 curveto 88.5 137.833 85.5 139.444 83.6667 140.333 curveto 81.8333 141.222 78.4444 141.056 77 139 curveto 75.5556 136.944 75.3333 131.778 75 128 curveto 74.6667 124.222 74.0556 118.5 75 116.333 curveto 75.9444 114.167 79.7222 115.167 80.6667 115 curveto 77.3333 112 moveto 77.4444 111.722 78.0556 111.889 77 112 curveto 75.9444 112.111 71.1111 112.389 71 112.667 curveto 70.8889 112.944 75.2778 113.778 76.3333 113.667 curveto 77.3889 113.556 77.2222 112.278 77.3333 112 curveto 81.6667 112.333 moveto 81.6667 111.778 81.0555 111.833 81.6667 112.333 curveto 82.2778 112.833 85.3333 114.778 85.3333 115.333 curveto 85.3333 115.889 82.2778 116.167 81.6667 115.667 curveto 81.0555 115.167 81.6667 112.889 81.6667 112.333 curveto 34 141.333 moveto 34.1667 139.389 33.2222 139.778 34 141.333 curveto 34.7778 142.889 37.3889 147.611 38.6667 150.667 curveto 39.9444 153.722 41.8333 158.167 41.6667 159.667 curveto 41.5 161.167 39.1111 160.778 37.6667 159.667 curveto 36.2222 158.556 33.7778 154.111 33 153 curveto 32.2222 151.889 32.8333 154.944 33 153 curveto 33.1667 151.056 33.8333 143.278 34 141.333 curveto 45 104.333 moveto 45.6667 104.333 45.4444 104.056 44.6667 104.333 curveto 43.8889 104.611 41 106 40.3333 106 curveto 39.6667 106 39.8889 104.611 40.6667 104.333 curveto 41.4444 104.056 44.3333 104.333 45 104.333 curveto 46.6667 105.667 moveto 46.2778 105.278 46.2778 105.111 46.3333 105.667 curveto 46.3889 106.222 46.6111 108.611 47 109 curveto 47.3889 109.389 48.7222 108.556 48.6667 108 curveto 48.6111 107.444 47.0556 106.056 46.6667 105.667 curveto 88 167.667 moveto 87.9444 167.611 88.1667 167.444 87.6667 167.667 curveto 87.1667 167.889 85.1667 168.833 85 169 curveto 84.8333 169.167 86.4444 168.722 86.6667 168.667 curveto 86.8889 168.611 86.1111 168.778 86.3333 168.667 curveto 86.5556 168.556 87.7222 168.167 88 168 curveto 88.2778 167.833 88.0556 167.722 88 167.667 curveto 95.6667 1.66667 moveto 96.2778 -2.72222 95.5556 2.66667 96.3333 2.66667 curveto 97.1111 2.66667 100.889 -4.44444 100.333 1.66667 curveto 99.7778 7.77778 96.1111 27.1111 93 39.3333 curveto 89.8889 51.5556 83.9444 62.7222 81.6667 75 curveto 79.3889 87.2778 80.1111 113.944 79.3333 113 curveto 78.5556 112.056 74.7778 83.3333 77 69.3333 curveto 79.2222 55.3333 89.5556 40.2778 92.6667 29 curveto 95.7778 17.7222 95.0555 6.05556 95.6667 1.66667 curveto 80 70.3333 moveto 80.1667 69.5556 86.2222 66.7222 80 72 curveto 73.7778 77.2778 49.3889 96.5556 42.6667 102 curveto 35.9444 107.444 40.9444 98.2778 39.6667 104.667 curveto 38.3889 111.056 35.4444 136.389 35 140.333 curveto 34.5556 144.278 35.4444 134.333 37 128.333 curveto 38.5556 122.333 37.6111 113.111 44.3333 104.333 curveto 51.0556 95.5556 71.5556 80.2778 77.3333 75.6667 curveto 83.1111 71.0555 78.5556 77.5555 79 76.6667 curveto 79.4444 75.7778 79.8333 71.1111 80 70.3333 curveto 81.6667 144.333 moveto 81.3333 144.222 80.3333 140.444 81.6667 144.333 curveto 83 148.222 88.1111 164.111 89.6667 167.667 curveto 91.2222 171.222 92 169.444 91 165.667 curveto 90 161.889 84.8889 148.444 83.6667 145 curveto 82.4444 141.556 84 145.111 83.6667 145 curveto 83.3333 144.889 82 144.444 81.6667 144.333 curveto 43.3333 107 moveto 43.1111 105 42.5556 105.611 43.3333 107.333 curveto 44.1111 109.056 47.5 114.5 48 117.333 curveto 48.5 120.167 46.8889 124 46.3333 124.333 curveto 45.7778 124.667 45.1667 122.222 44.6667 119.333 curveto 44.1667 116.444 43.5556 109 43.3333 107 curveto 91.6667 27.3333 moveto 92.1111 26.8333 95.8889 27.3333 91.6667 27.3333 curveto 87.4444 27.3333 72.9444 25.8333 66.3333 27.3333 curveto 59.7222 28.8333 55 32.0556 52 36.3333 curveto 49 40.6111 47.3889 48.7778 48.3333 53 curveto 49.2778 57.2222 53.4444 62.1111 57.6667 61.6667 curveto 61.8889 61.2222 69.1111 55.0556 73.6667 50.3333 curveto 78.2222 45.6111 83.1111 36.1111 85 33.3333 curveto 86.8889 30.5556 84.3333 34.1667 85 33.6667 curveto 85.6667 33.1667 87.8889 31.3889 89 30.3333 curveto 90.1111 29.2778 91.2222 27.8333 91.6667 27.3333 curveto 95.3333 29.6667 moveto 95.4445 29.3889 94.2778 28.7778 95.3333 29.6667 curveto 96.3889 30.5556 98.4444 32.7222 101.667 35 curveto 104.889 37.2778 110.667 38.7222 114.667 43.3333 curveto 118.667 47.9444 124.611 57.6667 125.667 62.6667 curveto 126.722 67.6667 123.111 74.9445 121 73.3333 curveto 118.889 71.7222 115.667 58.7222 113 53 curveto 110.333 47.2778 108.056 42.6111 105 39 curveto 101.944 35.3889 96.2778 32.8889 94.6667 31.3333 curveto 93.0556 29.7778 95.2222 29.9444 95.3333 29.6667 curveto 80 79.6667 moveto 80.2222 79.3333 79.3333 78.6667 80 79.6667 curveto 80.6667 80.6667 83.7222 84.5555 84 85.6667 curveto 84.2778 86.7778 82.5556 87 81.6667 86.3333 curveto 80.7778 85.6667 78.9444 82.7778 78.6667 81.6667 curveto 78.3889 80.5555 79.7778 80 80 79.6667 curveto 37 130.667 moveto 37 130.944 36.9444 130.222 37 130.667 curveto 37.0556 131.111 37.0556 133.278 37.3333 133.333 curveto 37.6111 133.389 38.6667 131.611 38.6667 131 curveto 38.6667 130.389 37.6111 130 37.3333 129.667 curveto 37.0556 129.333 37.0556 128.833 37 129 curveto 36.9444 129.167 37 130.389 37 130.667 curveto 35 131.333 moveto 35.0556 131.5 35.2778 131.222 35 131.333 curveto 34.7222 131.444 34 132.333 33.3333 132 curveto 32.6667 131.667 30.7222 130 31 129.333 curveto 31.2778 128.667 34.3889 127.833 35 128 curveto 35.6111 128.167 34.6667 129.778 34.6667 130.333 curveto 34.6667 130.889 34.9444 131.167 35 131.333 curveto 33.6667 132 moveto 33.3333 132.056 33.9444 131.611 33.6667 132 curveto 33.3889 132.389 32 133.889 32 134.333 curveto 32 134.778 33.0556 135.111 33.6667 134.667 curveto 34.2778 134.222 35.6667 132.111 35.6667 131.667 curveto 35.6667 131.222 34 131.944 33.6667 132 curveto 77 70 moveto 76.8889 69.7778 77.6111 69.6111 77 70 curveto 76.3889 70.3889 73.7778 71.6667 73.3333 72.3333 curveto 72.8889 73 73.6111 74.1667 74.3333 74 curveto 75.0556 73.8333 77.2222 72 77.6667 71.3333 curveto 78.1111 70.6667 77.1111 70.2222 77 70 curveto 92.3333 29 moveto 92.2778 28.5556 92.7778 28.6111 92.3333 29 curveto 91.8889 29.3889 90.3333 30.6111 89.6667 31.3333 curveto 89 32.0556 87.8333 33.2778 88.3333 33.3333 curveto 88.8333 33.3889 92 32.3889 92.6667 31.6667 curveto 93.3333 30.9444 92.3889 29.4444 92.3333 29 curveto 93.6667 31.6667 moveto 93.3333 31.5556 93.1111 31.1667 93 32 curveto 92.8889 32.8333 92.6111 35.6667 93 36.6667 curveto 93.3889 37.6667 95 38.6667 95.3333 38 curveto 95.6667 37.3333 95.2778 33.7222 95 32.6667 curveto 94.7222 31.6111 94 31.7778 93.6667 31.6667 curveto } def /bow-path { 0 -7 translate 57 24 moveto 57.4444 23.8889 50.3333 25.9444 57 24 curveto 63.6667 22.0556 97.6667 12.8889 97 12.3333 curveto 96.3333 11.7778 60.1111 18.6111 53 20.6667 curveto 45.8889 22.7222 53.6667 24.1111 54.3333 24.6667 curveto 55 25.2222 56.5556 24.1111 57 24 curveto 96.6667 13.4335 moveto 106.778 12.8068 103.111 9.67298 96.3333 13.4335 curveto 89.5556 17.194 67.8333 35.7181 56 35.9967 curveto 44.1667 36.2752 18.7778 19.0047 25.3333 15.1048 curveto 31.8889 11.205 90.3889 10.1605 95.3333 12.5978 curveto 100.278 15.0352 64.9444 28.9631 55 29.7291 curveto 45.0556 30.4952 28.7222 19.91 35.6667 17.194 curveto 42.6111 14.4781 86.5555 14.0603 96.6667 13.4335 curveto 94.6667 16 moveto 90.9444 16 89.7778 10.9444 94.6667 16 curveto 99.5556 21.0556 114.889 43.8333 124 46.3333 curveto 133.111 48.8333 149.111 36.1667 149.333 31 curveto 149.556 25.8333 133.889 18.3333 125.333 15.3333 curveto 116.778 12.3333 98.3333 8.66667 98 13 curveto 97.6667 17.3333 116.056 38.6667 123.333 41.3333 curveto 130.611 44 142.722 33.2222 141.667 29 curveto 140.611 24.7778 124.833 18.1667 117 16 curveto 109.167 13.8333 98.3889 16 94.6667 16 curveto 98.6667 13.6667 moveto 96.2222 11.8333 95.0555 9.94444 98.6667 13.6667 curveto 102.278 17.3889 116.167 33.3333 120.333 36 curveto 124.5 38.6667 124.833 31.5556 123.667 29.6667 curveto 122.5 27.7778 117.5 27.3333 113.333 24.6667 curveto 109.167 22 101.111 15.5 98.6667 13.6667 curveto 0 7 translate } def /berries-path { 82 78 moveto 82 78 3 0 360 arc 84 73 3 0 360 arc 79 73 3 0 360 arc 37 133 moveto 37 133 2.5 0 360 arc 38 130 2.5 0 360 arc 35 130 2.5 0 360 arc 86 149 moveto 86 149 2.5 0 360 arc 85 152 2.5 0 360 arc 82 150 2.5 0 360 arc } def /lips-color {.8 0 0} def /TmR18 /Times-Roman findfont 18 scalefont def /lips-path { % x y => - 56.2914 81.7585 moveto 53.6305 84.0504 54.6825 81.8324 56.2914 81.7585 curveto 57.9004 81.6845 62.3559 82.276 65.945 81.3149 curveto 69.5341 80.3538 73.9896 75.7699 77.8263 75.9917 curveto 81.6629 76.2135 85.5615 81.3888 88.965 82.6457 curveto 92.3685 83.9025 99.1754 85.9727 98.2472 83.5329 curveto 97.319 81.0931 86.861 69.8553 83.3956 68.0069 curveto 79.9302 66.1586 79.3114 72.4429 77.455 72.4429 curveto 75.5985 72.4429 75.7842 66.4544 72.2569 68.0069 curveto 68.7297 69.5595 58.9524 79.4666 56.2914 81.7585 curveto 60.8129 81.5476 moveto 60.7159 80.9637 59.6004 81.5476 60.8129 81.5476 curveto 62.0254 81.5476 66.1962 81.9723 68.0877 81.5476 curveto 69.9791 81.1229 70.8521 78.8404 72.1616 78.9996 curveto 73.471 79.1589 74.441 82.0784 75.9445 82.5031 curveto 77.4479 82.9278 79.8729 82.0254 81.1823 81.5476 curveto 82.4918 81.0699 81.9583 79.1589 83.8013 79.6366 curveto 85.6442 80.1144 93.2585 82.1315 92.24 84.4141 curveto 91.2216 86.6967 82.8313 93.2259 77.6904 93.332 curveto 72.5496 93.4382 64.2078 87.0152 61.3949 85.0511 curveto 58.5819 83.087 60.9099 82.1315 60.8129 81.5476 curveto } def /balloon-path { -10 -110 translate 106 145 moveto 106.167 145.444 108.833 138.167 106 145 curveto 103.167 151.833 88.2222 185.722 89 186 curveto 89.7778 186.278 105.889 153.444 110.667 146.667 curveto 115.444 139.889 110.889 146.056 117.667 145.333 curveto 124.444 144.611 142.667 145.389 151.333 142.333 curveto 160 139.278 166.722 134.167 169.667 127 curveto 172.611 119.833 173.444 106.444 169 99.3333 curveto 164.556 92.2222 152.611 86.7222 143 84.3333 curveto 133.389 81.9444 120.222 82.8333 111.333 85 curveto 102.444 87.1667 94.5 91.3889 89.6667 97.3333 curveto 84.8333 103.278 82.2778 114.833 82.3333 120.667 curveto 82.3889 126.5 86.2222 128.722 90 132.333 curveto 93.7778 135.944 102.333 140.222 105 142.333 curveto 107.667 144.444 105.833 144.556 106 145 curveto 10 110 translate } def /lip-window null def /lips { % x y => - translate /lip-window framebuffer /new LiteWindow send def { /paintframe { } def /paintclient { } def map % unmap FrameCanvas unmapcanvas ClientCanvas unmapcanvas FrameCanvas /transparent true put FrameCanvas /retained true put ClientCanvas /transparent true put 1 -1 scale newpath lips-path balloon-path closepath 1 -1 scale FrameCanvas reshapecanvas FrameCanvas mapcanvas ClientCanvas mapcanvas /PaintFrameBorder { % - => - (Paint frame border areas) } def /PaintClient { FrameCanvas setcanvas 1 -1 scale 0 setlinecap 10 setmiterlimit 2 setlinejoin 0.1 setlinewidth 0 setgray newpath lips-path closepath gsave lips-color setrgbcolor fill grestore stroke newpath balloon-path closepath gsave .5 .7 .7 setrgbcolor fill grestore stroke TmR18 setfont 85 15 moveto gsave 1 -1 scale (Kiss Me!) 0 setgray show grestore 1 -1 scale } def /Pucker { map paint totop .025 sleep unmap } def (Resize) FrameMenu remove-menu-item (Stretch Corner) FrameMenu remove-menu-item (Stretch Edge) FrameMenu remove-menu-item (Close) FrameMenu remove-menu-item } lip-window send /unmap lip-window send } def /mistletoe { % x y => - % First create the pop-up window for the kiss 2 copy 130 sub exch 30 add exch gsave lips grestore % Now make the mistletoe window. translate /mwin framebuffer /new LiteWindow send def { /paintframe { } def /paintclient { } def map FrameCanvas unmapcanvas ClientCanvas unmapcanvas FrameCanvas /transparent true put ClientCanvas /transparent true put 1 -1 scale newpath mistletoe-sprig-path bow-path berries-path closepath 1 -1 scale FrameCanvas reshapecanvas FrameCanvas mapcanvas ClientCanvas mapcanvas /PaintFrameBorder { % - => - (Paint frame border areas) } def /PaintClient { FrameCanvas setcanvas 1 -1 scale 0 setlinecap 10 setmiterlimit 2 setlinejoin 0.1 setlinewidth .25 .4 .25 setrgbcolor newpath mistletoe-sprig-path closepath gsave .5 .6 .5 setrgbcolor fill grestore stroke % The bow newpath bow-path closepath gsave .8 0 0 setrgbcolor eofill grestore .5 0 0 setrgbcolor stroke newpath berries-path closepath gsave .9 setgray fill grestore 0 setgray stroke 1 -1 scale } def % Set up so that when we touch the mistletoe, it demands a kiss. { /Pucker lip-window send } /EnterFrame where pop /EnterFrame get array-concat /EnterFrame exch def % Add code to the move method so the lips move with us. { 2 copy 130 sub exch 30 add exch /move lip-window send systemdict /sunview known not {position-offset sub} if } /move where pop /move get array-concat /move exch def % Don't allow resizing or close (Resize) FrameMenu remove-menu-item (Stretch Corner) FrameMenu remove-menu-item (Stretch Edge) FrameMenu remove-menu-item (Close) FrameMenu remove-menu-item } mwin send /paint mwin send } def 180 880 mistletoe