Thanks Simon,
Actually that code didn't answer all my questions, just raised a few more, but the following code should allow shapescript designers to understand how the shapescript will react to way-points as they are added/removed. Your script (with my mods) also answers many questions I had about why the lines behave the way they do - for some of the standard scripts.
shape main
{
noShadow=true;
// This pen style will be ignored
// because nothing is drawn.
setpen(0,0,0,1);
SetLineStyle("solid");
// This pen style will be used for
// non-center segments because it
// is the first that is used for
// drawing.
setpen(255,0,0,2);
SetLineStyle("dash");
moveto(0,0);
lineto(0,0); //Even though the drawing is to (0,0)!
//NOTE: we're going to split the center segment into 3 parts
// This line style is used in the center
// segment, but no others because it
// isn't the first one drawn with.
setpen(0,0,255,1); //First part
SetLineStyle("dashdot");
lineto(20,0);
setpen(0,255,0,2); //Second part
SetLineStyle("dot");
lineto(80,0);
setpen(128,128,128,1); //Third part
SetLineStyle("dashdotdot");
lineto(100,0);
// This line style is used for a
// decoration in the center segment only.
setpen(0,0,0,1);
SetLineStyle("solid");
setfixedregion(40,-10,60,10);
ellipse(40,-10,60,10);
}
BTW: where is the stuff about "Center" segments documented?
Paolo