447 os << "/sq { newpath 2 index 1 index add 2 index 2 index add moveto\n" |
449 os << "/sq { newpath 2 index 1 index add 2 index 2 index add moveto\n" |
448 << " 2 index 1 index sub 2 index 2 index add lineto\n" |
450 << " 2 index 1 index sub 2 index 2 index add lineto\n" |
449 << " 2 index 1 index sub 2 index 2 index sub lineto\n" |
451 << " 2 index 1 index sub 2 index 2 index sub lineto\n" |
450 << " 2 index 1 index add 2 index 2 index sub lineto\n" |
452 << " 2 index 1 index add 2 index 2 index sub lineto\n" |
451 << " closepath pop pop pop} bind def\n"; |
453 << " closepath pop pop pop} bind def\n"; |
|
454 //x y r |
|
455 os << "/di { newpath 2 index 1 index add 2 index moveto\n" |
|
456 << " 2 index 2 index 2 index add lineto\n" |
|
457 << " 2 index 1 index sub 2 index lineto\n" |
|
458 << " 2 index 2 index 2 index sub lineto\n" |
|
459 << " closepath pop pop pop} bind def\n"; |
452 // x y r cr cg cb |
460 // x y r cr cg cb |
453 os << "/nc { setrgbcolor 2 index 2 index 2 index c fill\n" |
461 os << "/nc { setrgbcolor 2 index 2 index 2 index c fill\n" |
454 << " 0 0 0 setrgbcolor dup " |
462 << " 0 0 0 setrgbcolor dup " |
455 << _nodeBorderQuotient << " mul setlinewidth " |
463 << _nodeBorderQuotient << " mul setlinewidth " |
456 << 1+_nodeBorderQuotient/2 << " div c stroke\n" |
464 << 1+_nodeBorderQuotient/2 << " div c stroke\n" |
457 << " } bind def\n"; |
465 << " } bind def\n"; |
458 os << "/nsq { setrgbcolor 2 index 2 index 2 index sq fill\n" |
466 os << "/nsq { setrgbcolor 2 index 2 index 2 index sq fill\n" |
459 << " 0 0 0 setrgbcolor dup " |
467 << " 0 0 0 setrgbcolor dup " |
460 << _nodeBorderQuotient << " mul setlinewidth " |
468 << _nodeBorderQuotient << " mul setlinewidth " |
461 << 1+_nodeBorderQuotient/2 << " div sq stroke\n" |
469 << 1+_nodeBorderQuotient/2 << " div sq stroke\n" |
|
470 << " } bind def\n"; |
|
471 os << "/ndi { setrgbcolor 2 index 2 index 2 index di fill\n" |
|
472 << " 0 0 0 setrgbcolor dup " |
|
473 << _nodeBorderQuotient << " mul setlinewidth " |
|
474 << 1+_nodeBorderQuotient/2 << " div di stroke\n" |
462 << " } bind def\n"; |
475 << " } bind def\n"; |
463 os << "/arrl " << _arrowLength << " def\n"; |
476 os << "/arrl " << _arrowLength << " def\n"; |
464 os << "/arrw " << _arrowWidth << " def\n"; |
477 os << "/arrw " << _arrowWidth << " def\n"; |
465 // l dx_norm dy_norm |
478 // l dx_norm dy_norm |
466 os << "/lrl { 2 index mul exch 2 index mul exch rlineto pop} bind def\n"; |
479 os << "/lrl { 2 index mul exch 2 index mul exch rlineto pop} bind def\n"; |