src/samples/sample10_how_mscgen_js_works.mscin
/*
how mscgen_js works internally, roughly
The Colors were added by applying the 'Automatic'
color scheme in the interpreter
*/
msc {
hscale="0.7", wordwraparcs=1;
you [linecolor="#008800", textbgcolor="#CCFFCC", arclinecolor="#008800"],
controler [linecolor="#FF0000", textbgcolor="#FFCCCC", arclinecolor="#FF0000"],
parser [label="parser (PEGjs)", linecolor="#0000FF", textbgcolor="#CCCCFF", arclinecolor="#0000FF"],
renderer [linecolor="#FF00FF", textbgcolor="#FFCCFF", arclinecolor="#FF00FF"],
rast_exp [label="raster exporter", linecolor="black", textbgcolor="#DDDDDD", arclinecolor="black"],
comments [label=" ", linecolor="transparent"];
you => controler [label="some text"];
controler => parser [label="ok?"],
comments note comments [label="We use the ultra-cool PEGjs parser", linecolor="black", textbgcolor="#FFFFCC"];
parser >> controler [label="syntax tree"];
controler => renderer [label="syntax tree"];
renderer => renderer [label="render"],
comments note comments [label="This is the non-trivial stuff...", linecolor="black", textbgcolor="#FFFFCC"];
renderer >> controler [label="vector picture"];
controler >> you [label="vector picture"];
---;
you => controler [label="raster graphics?"];
controler => rast_exp [label="vector picture"];
rast_exp rbox comments [label="paint the vector graphic on a canvas with drawImage() and return the dataURL of that canvas", linecolor="black", textbgcolor="#FFFFCC"];
rast_exp >> controler [label="raster picture"];
controler >> you [label="raster picture"];
}