printmethod
objectBefore printing a method using a printmethod
object, two things
must be set up: the object must be given a method to print, and the
parameters for printing described in the previous section must be
initialised.
The class has two constructors:
These two constructors create a
printmethod
object. In the first case, no method is specified; a method will have to be given later, before anything can be printed. In the second case, a reference to the method m is stored for printing after the parameters have been set up.
After the object has been created, the method can be queried and changed with these functions:
This returns the method referred to by this
printmethod
object.
This function stored a reference to the method m in the
printmethod
object, for subsequence printing.
The parameters for printing, described in the previous section, may be manipulated with several member functions.
This function sets the parameters to default values, which relate to the method to be printed; so it should not be called before a method has been given to the
printmethod
object. Specifically, the parameters are set as follows:
- Numbers are to be printed in 10-point Helvetica, and the spacing between bells is 12 points both horizontally and vertically;
- Each column contains a single lead; an entire plain course of the method will be printed, with leads side by side;
- The output is positioned at the bottom left of the page;
- Numbers will be missed underneath lines, except for lead heads;
- Place notation will be printed to the left of the first lead only;
- Each hunt bell is shown with a red line, a quarter of a point thick;
- The smallest working bell which makes a place over the lead end is shown with a blue line, half a point thick, and place bells are shown for this bell. If no working bell makes a place over the lead end, the smallest working bell is chosen instead.
This function scales and arranges the method to fit in the given space, as specified by width and height. The parameters which are calculated by this function are
rows_per_column
,columns_per_set
,hgap
,vgap
,opt.style.size
,opt.xspace
andopt.yspace
. Two possible layouts are possible: if vgap_mode isfalse
, then only one column set is used, with each column containing a whole number of leads; if vgap_mode istrue
, then each column contains precisely one lead, and as many column sets as necessary are used. The effect of this is that, in the first case, the second lead appears below the first one; in the second case, the second lead appears to the right of the first one. The last argument aspect sets the ratio ofopt.xspace
toopt.yspace
.The chosen layout is that which, given the constraints specified, allows the largest of output.