6 #include "postscript.hh"
8 PostScriptOutput::PostScriptOutput(ofstream& f)
12 "%!PS-Adobe-2.0 EPSF-2.0\n"
13 "%%Creator: moebius\n"
14 "%%BoundingBox: -500 -500 500 500\n"
18 " 1 setlinecap 1 setlinejoin 0.002 setlinewidth\n"
25 PostScriptOutput::~PostScriptOutput() {
33 void PostScriptOutput::drawcell(const Point* list, int n) {
35 for (int i=0; i<n; i++) p[i]= Onscreen(list[i]);
36 docell(p,n,"1 setgray fill");
37 docell(p,n,"0 setgray stroke");
40 void PostScriptOutput::docell(const Onscreen* list, int n, const char *what) {
42 file << " " << list->x << " " << list->y << " moveto\n";
44 for (int i=1; i<n; i++, list++) {
45 file << " " << list->x << " " << list->y << " lineto\n";
47 file << " closepath " << what << "\n";