30 iFileName =
"freestyle.ps";
35 cerr <<
"couldn't open the output file " << iFileName << endl;
37 _ofstream <<
"%!PS-Adobe-2.0 EPSF-2.0" << endl;
38 _ofstream <<
"%%Creator: Freestyle (http://artis.imag.fr/Software/Freestyle)" << endl;
51 vector<Strip *> &strips = iStrokeRep->
getStrips();
52 Strip::vertex_container::iterator
v[3];
55 for (vector<Strip *>::iterator s = strips.begin(), send = strips.end(); s != send; ++s) {
57 v[0] = vertices.begin();
63 while (
v[2] != vertices.end()) {
68 color[0] = svRep[0]->
color();
73 _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
static Canvas * getInstance()
virtual int height() const =0
virtual int width() const =0
virtual void RenderStrokeRep(StrokeRep *iStrokeRep) const
PSStrokeRenderer(const char *iFileName=NULL)
virtual void RenderStrokeRepBasic(StrokeRep *iStrokeRep) const
std::vector< StrokeVertexRep * > vertex_container
vector< Strip * > & getStrips()