主题:求助!!看这段代码运行后怎样绘图?用什么绘图?
void pssnap(ostream & psout, int page){
if(!page){
psout << "%!PS-Adobe-2.0" << endl;
psout << "%%BoundingBox: 0 0 700 500" << endl;
psout << "/fx {3 -1 roll exch moveto" << endl;
psout << "0.5 mul dup rmoveto 1 0 rlineto} def" << endl;
psout << "/fy {3 -1 roll exch moveto 0.5 mul dup rmoveto 0.5 0.5 rlineto}";
psout << "def" << endl;
psout << "/lx {0 exch rlineto 1 0 rlineto} def" << endl;
psout << "/ly {0 exch rlineto 0.5 0.5 rlineto} def" << endl;
psout << "/s {stroke} def" << endl;
}
psout << "%%Page: " << page << " " << page << endl;
psout << 460/float(L) <<" "<<100/float(L)<<" scale 5 5 translate 0.1";
psout << " setlinewidth" << endl;
for(unsigned int i=1; i<L+1; i++){
psout << i << " 1 " << H[i][1]/3.0 << " fy" << endl;
for(unsigned int j=2; j<L+1; j++){
psout << (H[i][j]-H[i][j-1])/3.0 << " ly" << endl;
}
psout << " s" << endl;
}
for(unsigned int j=1; j<L+1; j++){
psout << " 1 " << j << " " << H[1][j]/3.0 << " fx" << endl;
for(unsigned int i=2; i<L+1; i++){
psout << (H[i][j]-H[i-1][j])/3.0 << " lx" << endl;
}
psout << " s" << endl;
}
psout << "showpage" << endl;
}
if(!page){
psout << "%!PS-Adobe-2.0" << endl;
psout << "%%BoundingBox: 0 0 700 500" << endl;
psout << "/fx {3 -1 roll exch moveto" << endl;
psout << "0.5 mul dup rmoveto 1 0 rlineto} def" << endl;
psout << "/fy {3 -1 roll exch moveto 0.5 mul dup rmoveto 0.5 0.5 rlineto}";
psout << "def" << endl;
psout << "/lx {0 exch rlineto 1 0 rlineto} def" << endl;
psout << "/ly {0 exch rlineto 0.5 0.5 rlineto} def" << endl;
psout << "/s {stroke} def" << endl;
}
psout << "%%Page: " << page << " " << page << endl;
psout << 460/float(L) <<" "<<100/float(L)<<" scale 5 5 translate 0.1";
psout << " setlinewidth" << endl;
for(unsigned int i=1; i<L+1; i++){
psout << i << " 1 " << H[i][1]/3.0 << " fy" << endl;
for(unsigned int j=2; j<L+1; j++){
psout << (H[i][j]-H[i][j-1])/3.0 << " ly" << endl;
}
psout << " s" << endl;
}
for(unsigned int j=1; j<L+1; j++){
psout << " 1 " << j << " " << H[1][j]/3.0 << " fx" << endl;
for(unsigned int i=2; i<L+1; i++){
psout << (H[i][j]-H[i-1][j])/3.0 << " lx" << endl;
}
psout << " s" << endl;
}
psout << "showpage" << endl;
}