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() {
32 void PostScriptOutput::drawcell(const Point* list, int n) {
34 for (int i=0; i<4; i++) p[i]= Onscreen(list[i]);
35 docell(p,n,"1 setgray fill");
36 docell(p,n,"0 setgray stroke");
39 void PostScriptOutput::docell(const Onscreen* list, int n, const char *what) {
41 file << " " << list->x << " " << list->y << " moveto\n";
43 for (int i=1; i<n; i++, list++) {
44 file << " " << list->x << " " << list->y << " lineto\n";
46 file << " closepath " << what << "\n";