18 iFileName =
"freestyle.ps";
23 cerr <<
"couldn't open the output file " << iFileName << endl;
25 _ofstream <<
"%!PS-Adobe-2.0 EPSF-2.0" << endl;
26 _ofstream <<
"%%Creator: Freestyle (http://artis.imag.fr/Software/Freestyle)" << endl;
39 vector<Strip *> &strips = iStrokeRep->
getStrips();
40 Strip::vertex_container::iterator
v[3];
43 for (vector<Strip *>::iterator s = strips.begin(), send = strips.end(); s != send; ++s) {
44 Strip::vertex_container &vertices = (*s)->vertices();
45 v[0] = vertices.begin();
51 while (
v[2] != vertices.end()) {
56 color[0] = svRep[0]->
color();
61 _ofstream << (color[0])[0] <<
" " << (color[0])[1] <<
" " << (color[0])[2] <<
" setrgbcolor"
Class to define a canvas designed to draw style modules.
Class to define the Postscript rendering of a stroke.
ATTR_WARN_UNUSED_RESULT const BMVert * v
virtual int height() const =0
virtual int width() const =0
static Canvas * getInstance()
virtual void RenderStrokeRep(StrokeRep *iStrokeRep) const
virtual void RenderStrokeRepBasic(StrokeRep *iStrokeRep) const
PSStrokeRenderer(const char *iFileName=nullptr)
vector< Strip * > & getStrips()