@ This file contains a set of functions concerned with the drawing of @ circles. It requires PMS version 2.1 or greater. @ @ Philip Hazel @ October 1993 @ Fixed to work with grace notes 4/6/94 @ This requires PMS 3.0 or greater (for fixes therein). @ This function draws a circle. It must be called with four values on @ the stack: the thickness of the line, the radius, and the coordinates @ of the centre. For example: @ heading draw 0.4 20 24 0 circle @ The variables xx1 - xx4 are used as local variables. draw circle moveto 1.414 div dup 0.6 mul /xx1 exch def dup 1.4 mul /xx2 exch def dup 0.5 mul /xx3 exch def dup 2.0 mul /xx4 exch def neg dup rmoveto xx1 xx3 neg xx2 xx3 neg xx4 0 rcurveto xx1 xx1 xx1 xx2 0 xx4 rcurveto xx1 neg xx3 xx2 neg xx3 xx4 neg 0 rcurveto xx1 neg xx1 neg xx1 neg xx2 neg 0 xx4 neg rcurveto setlinewidth stroke enddraw @ This function draws a circle round the next notehead. It must be called @ with the line thickness value on the stack. For example: @ [draw 0.5 circlenote] g @ This works for chords as well as notes, and is best called via a macro @ with the note as its argument. The following macro has an optional @ second argument for changing the line thickness, which defaults to 0.4. *define circ(,0.4) [draw &&2 circlenote] &&1 @ Accidentals are accounted for, and this works OK for single notes. For @ some chords, however, the radius may turn out to be too big. The variables @ xx1 - xx4 are used as local variables (because it calls the circle function). draw circlenote headtop headbottom sub 2 div /xx1 exch def xx1 3.5 add accleft add headright headleft add 2 div 0.25 add headbottom xx1 add draw circle enddraw @ End of circles functions.