metapost

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
metapost [2020/03/01 22:58]
tarquinwj [Adding custom styled labels at any point/linepoint]
metapost [2020/07/31 23:10] (current)
tarquinwj Rope options
Line 1127: Line 1127:
       fi;       fi;
     else:     else:
-      thdraw P;+      begingroup; 
 +        save type; 
 +        string type; 
 +        if known ATTR_type: 
 +          type:=ATTR_type; 
 +        else: 
 +          type:="primary"; 
 +        fi; 
 +        if type = "secondary": 
 +          thdraw P withcolor (0.7, 0.7, 0.7); 
 +        else: 
 +          thdraw P; 
 +        fi; 
 +      endgroup;
     fi;     fi;
   enddef;   enddef;
 endcode endcode
 </code> </code>
 +
 +Rope lines default to using the standard colour (black, unless you change it with "symbol-color"). Optionally use it with the following -attr setting "value" options on the line:
 +
 +  * -attr type primary   = (default) use the default colour (black)
 +  * -attr type secondary = draws in grey
 +
 +This allows you to have ropes with two different colours, useful if ropes are optional or follow an uncommon optional route.
  
 ===Deviations=== ===Deviations===
  • metapost.txt
  • Last modified: 11 days ago
  • by tarquinwj