<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">If you have a clear example where you are having issues with the suggested approach, we could point out any remaining issues.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">-Joshua</DIV></BLOCKQUOTE></DIV><BR><DIV>well, here is my second approach.</DIV><DIV>i sticked to the copypixel of the buffer sketch (sketch2) because i need to redraw sliders that were covered by the</DIV><DIV>moving slider.</DIV><DIV>thanks for any advices.</DIV><DIV>klaus</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>the testing patch:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P toggle 154 31 15 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P window setfont "Sans Serif" 9.;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P window linecount 1;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P message 153 50 44 196617 fsaa \$1;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P message 34 405 87 196617 1 369 124;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P newex 34 380 62 196617 prepend set;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P flonum 83 27 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P message 82 47 53 196617 radius \$1;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P button 239 134 15 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#N vpatcher 50 119 650 519;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P inlet 241 72 15 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P outlet 142 250 15 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P window setfont "Sans Serif" 9.;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P newex 242 221 75 196617 prepend points;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P newex 332 181 31 196617 + 20;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P newex 242 164 27 196617 - 1;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P button 241 96 15 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P newex 242 192 40 196617 0 0 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P newex 279 162 32 196617 * 20;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P newex 332 161 27 196617 * 2;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P newex 241 122 40 196617 uzi 20;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 7 0 8 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 0 1 8 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 9 0 4 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 4 0 0 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 0 2 5 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 5 0 3 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 3 0 7 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 2 0 3 1;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 6 0 3 2;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 0 2 2 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 0 2 1 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 1 0 6 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P pop;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P newobj 239 153 53 196617 p draw20;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P message 156 128 52 196617 0 200 10;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P message 34 113 87 196617 clearpoints \, bang;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P button 103 144 15 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P message 135 109 144 196617 0 200 70 \, 1 300 20 \, 2 50 50;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P newex 145 153 75 196617 prepend points;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P user jsui 34 179 571 191 3 0 0 llseq.js;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 12 0 0 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 8 0 0 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 4 0 0 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 3 0 0 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 1 0 0 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 6 0 0 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 0 0 10 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 10 0 11 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 9 0 8 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 5 0 3 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 2 0 3 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 5 0 1 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 2 0 1 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 13 0 12 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P connect 7 0 6 0;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Geneva" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">#P window clipboard copycount 14;</SPAN></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>the (hopefully not too messy) javascript:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>autowatch = 1;</DIV><DIV>inlets = 2;</DIV><DIV>outlets = 1;</DIV><DIV>sketch.default2d();</DIV><DIV>var vbrgb = [0.3,0.3,0.6];</DIV><DIV>var vfrgb = [0.8,0.8,0.3];</DIV><DIV>var w = [0,0,0];</DIV><DIV>var vx = 0;</DIV><DIV>var vy = 0;</DIV><DIV>var vradius;</DIV><DIV>var wradius;</DIV><DIV>var width = box.rect[2] - box.rect[0];</DIV><DIV>var height = box.rect[3] - box.rect[1];</DIV><DIV>var point = new Array();</DIV><DIV>var dx, dy, selected;</DIV><DIV>var sketch2 = new Sketch(width,height);</DIV><DIV>sketch2.default2d();</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>radius(0.1);</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>function clearpoints()</DIV><DIV>{</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>point.length = 0;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>selected = -1;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>rendersketch();</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>with (sketch) </DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>{</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>glclearcolor(vbrgb);<SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>glclear();<SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>}</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>refresh();</DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>function points()</DIV><DIV>{</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>var a = arrayfromargs(arguments);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>var b = a.length;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>point[arguments[0]] = [arguments[1], height-arguments[2]];</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>if (a.length>3) point[a[0][3]] = a[3];</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>rendersketch();</DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>function draw()</DIV><DIV>{</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>w = sketch.screentoworld(point[selected]);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>with (sketch) </DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>{</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>glclearcolor(vbrgb);<SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>glclear();<SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>copypixels(sketch2,0,0);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>if (selected > -1)</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>{</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>glcolor(vfrgb);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>moveto(w[0]+vradius,w[1]-vradius);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>plane(vradius,vradius);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>moveto(w[0],w[1]-0.01);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>line(0,-2.);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>}</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>}</DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>function bang()</DIV><DIV>{</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>draw();</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>refresh();</DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>function fsaa(v)</DIV><DIV>{</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>sketch.fsaa = v;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>sketch2.fsaa = v;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>bang();</DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>function frgb(r,g,b)</DIV><DIV>{</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>vfrgb[0] = r/255.;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>vfrgb[1] = g/255.;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>vfrgb[2] = b/255.;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>draw();</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>refresh();</DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>function brgb(r,g,b)</DIV><DIV>{</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>vbrgb[0] = r/255.;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>vbrgb[1] = g/255.;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>vbrgb[2] = b/255.;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>draw();</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>refresh();</DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>function radius(v)</DIV><DIV>{</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>vradius = v;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>wradius = (sketch.worldtoscreen(v)[0]-sketch.worldtoscreen(0)[0])*2.;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>draw();</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>refresh();</DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>function onresize(w,h)</DIV><DIV>{<SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>width = box.rect[2] - box.rect[0];</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>height = box.rect[3] - box.rect[1];</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>post("width", width, " height", height, "\n");</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>draw();</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>refresh();</DIV><DIV>}</DIV><DIV>onresize.local = 1; //private</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>function rendersketch()</DIV><DIV>{</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>with (sketch2) </DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>{</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>glclearcolor(vbrgb);<SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>glclear();</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>}</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>for (i=0;i<point.length;i++)</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>{</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>if (i!= selected)</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>{</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>w = sketch2.screentoworld(point[i]);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>with (sketch2) </DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>{</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>glcolor(vfrgb);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>moveto(w[0]+vradius,w[1]-vradius);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>plane(vradius,vradius);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>moveto(w[0],w[1]-0.01);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>moveto(w[0],w[1]-0.01);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>line(0,-2.);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>}</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>}</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>}</DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>function onclick(x,y)</DIV><DIV>{</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>//post(x,y,"\n");</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>if (x<0) x = 0;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>else if (x>width) x = width;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>if (y<0) y = 0;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>else if (y>height) y = height;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>selected = -1;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>for (i=0;i<point.length;i++)</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>{</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>if (x>point[i][0] && x<point[i][0]+wradius && y>point[i][1] && y<point[i][1]+wradius)</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>{</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>selected = i;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>dx = point[i][0]-x;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>dy = point[i][1]-y;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>rendersketch();</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>ondrag(x,y);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>}</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>}</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN></DIV><DIV>}</DIV><DIV>onclick.local = 1; //private</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>function ondrag(x,y)</DIV><DIV>{<SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>if (selected>-1)</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>{</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>point[selected][0] = x+dx;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>point[selected][1] = y+dy;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>outlet(0,selected,point[selected][0],height-point[selected][1]);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>bang();</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>}</DIV><DIV>}</DIV><DIV>ondrag.local = 1; //private </DIV></BODY></HTML>