Tree @upstream/2.23 (Download .tar.gz)
- base
- doc
- examples
- GUI
- patches
- prc
- tests
- absyn.cc
- absyn.h
- access.cc
- access.h
- algebra3.cc
- algebra3.h
- allsymbols.h
- angle.h
- application.cc
- application.h
- arcball.cc
- arcball.h
- array.cc
- array.h
- arrayop.h
- aspy.py
- asy-keywords.el
- asy-list.pl
- asy.ico
- asy.rc
- asymptote.nsi
- asymptote.spec
- autogen.sh
- ax_pthread.m4
- bbox.h
- bbox3.h
- BUGS
- builtin.cc
- builtin.h
- builtin.symbols.h
- callable.cc
- callable.h
- camp.l
- camp.tab.cc
- camp.tab.h
- camp.y
- camperror.cc
- camperror.h
- castop.h
- ChangeLog
- coder.cc
- coder.h
- coenv.cc
- coenv.h
- common.h
- config.guess
- config.h.in
- config.sub
- configure
- configure.ac
- constructor.cc
- dec.cc
- dec.h
- Delaunay.cc
- Delaunay.h
- drawclipbegin.h
- drawclipend.h
- drawelement.h
- drawfill.cc
- drawfill.h
- drawgrestore.h
- drawgroup.h
- drawgsave.h
- drawimage.h
- drawlabel.cc
- drawlabel.h
- drawlayer.h
- drawpath.cc
- drawpath.h
- drawpath3.cc
- drawpath3.h
- drawsurface.cc
- drawsurface.h
- drawverbatim.h
- entry.cc
- entry.h
- env.cc
- env.h
- envcompleter.cc
- envcompleter.h
- EnvVarUpdate.nsh
- errormsg.cc
- errormsg.h
- errors
- errortest.asy
- exp.cc
- exp.h
- fftw++.cc
- fftw++.h
- fftw++asy.cc
- fileio.cc
- fileio.h
- findsym.pl
- flatguide.cc
- flatguide.h
- fpu.h
- frame.h
- fundec.cc
- fundec.h
- genv.cc
- genv.h
- getopt.c
- getopt.h
- getopt1.c
- glrender.cc
- glrender.h
- gsl.cc
- gsl.symbols.h
- guide.cc
- guide.h
- guideflags.h
- impdatum.cc
- inst.h
- INSTALL
- install-sh
- interact.cc
- interact.h
- item.h
- keywords.cc
- keywords.pl
- knot.cc
- knot.h
- lex.yy.cc
- lexical.h
- LICENSE
- LICENSE.LESSER
- lnkX64IconFix.nsh
- locate.cc
- locate.h
- main.cc
- Makefile.in
- mathop.h
- memory.h
- mod.h
- modifier.h
- name.cc
- name.h
- newexp.cc
- newexp.h
- opcodes.h
- opsymbols.h
- opsymbols.pl
- pair.h
- parser.cc
- parser.h
- path.cc
- path.h
- path3.cc
- path3.h
- pen.cc
- pen.h
- picture.cc
- picture.h
- pipestream.h
- policy.h
- prcfile.h
- predicates.cc
- predicates.h
- primitives.h
- process.cc
- process.h
- profile.py
- profiler.h
- program.cc
- program.h
- psfile.cc
- psfile.h
- quaternion.cc
- quaternion.h
- README
- record.cc
- record.h
- refaccess.cc
- refaccess.h
- ReleaseNotes
- rounding.h
- runarray.cc
- runarray.h
- runarray.in
- runarray.symbols.h
- runbacktrace.cc
- runbacktrace.h
- runbacktrace.in
- runbacktrace.symbols.h
- runfile.cc
- runfile.h
- runfile.in
- runfile.symbols.h
- runhistory.cc
- runhistory.h
- runhistory.in
- runhistory.symbols.h
- runlabel.cc
- runlabel.h
- runlabel.in
- runlabel.symbols.h
- runmath.cc
- runmath.h
- runmath.in
- runmath.symbols.h
- runpair.cc
- runpair.h
- runpair.in
- runpair.symbols.h
- runpath.cc
- runpath.h
- runpath.in
- runpath.symbols.h
- runpath3d.cc
- runpath3d.h
- runpath3d.in
- runpath3d.symbols.h
- runpicture.cc
- runpicture.h
- runpicture.in
- runpicture.symbols.h
- runstring.cc
- runstring.h
- runstring.in
- runstring.symbols.h
- runsystem.cc
- runsystem.h
- runsystem.in
- runsystem.symbols.h
- runtime.cc
- runtime.h
- runtime.in
- runtime.pl
- runtime.symbols.h
- runtimebase.in
- runtriple.cc
- runtriple.h
- runtriple.in
- runtriple.symbols.h
- seconds.h
- settings.cc
- settings.h
- simpson.cc
- stack.cc
- stack.h
- stm.cc
- stm.h
- symbol.cc
- symbol.h
- table.h
- texfile.cc
- texfile.h
- TODO
- tr.cc
- tr.h
- transform.h
- triple.h
- types.cc
- types.h
- types.symbols.h
- util.cc
- util.h
- varinit.cc
- varinit.h
- virtualfieldaccess.cc
- virtualfieldaccess.h
- vm.h
- wce
- xstream.h
picture.h @upstream/2.23 — raw · history · blame
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | /***** * picture.h * Andy Hamerlindl 2002/06/06 * * Stores a picture as a list of drawElements and handles its output to * PostScript. *****/ #ifndef PICTURE_H #define PICTURE_H #include <sstream> #include <iostream> #include "drawelement.h" namespace camp { class picture : public gc { private: bool labels; size_t lastnumber; size_t lastnumber3; transform T; // Keep track of accumulative picture transform bbox b; bbox b_cached; // Cached bounding box boxvector labelbounds; bboxlist bboxstack; bool transparency; groupsmap groups; unsigned billboard; public: bbox3 b3; // 3D bounding box typedef mem::list<drawElement*> nodelist; nodelist nodes; picture() : labels(false), lastnumber(0), lastnumber3(0), T(identity), transparency(false) {} // Destroy all of the owned picture objects. ~picture(); // Prepend an object to the picture. void prepend(drawElement *p); // Append an object to the picture. void append(drawElement *p); // Enclose each layer with begin and end. void enclose(drawElement *begin, drawElement *end); // Add the content of another picture. void add(picture &pic); void prepend(picture &pic); bool havelabels(); bool have3D(); bbox bounds(); bbox3 bounds3(); // Compute bounds on ratio (x,y)/z for 3d picture (not cached). pair ratio(double (*m)(double, double)); bool Transparency() { return transparency; } int epstopdf(const string& epsname, const string& pdfname); bool texprocess(const string& texname, const string& tempname, const string& prefix, const pair& bboxshift, bool svgformat); bool postprocess(const string& prename, const string& outname, const string& outputformat, double magnification, bool wait, bool view, bool pdftex, bool svgformat); // Ship the picture out to PostScript & TeX files. bool shipout(picture* preamble, const string& prefix, const string& format, double magnification=0.0, bool wait=false, bool view=true); void render(GLUnurbs *nurb, double size2, const triple &Min, const triple& Max, double perspective, bool lighton, bool transparent) const; bool shipout3(const string& prefix, const string& format, double width, double height, double angle, double zoom, const triple& m, const triple& M, const pair& shift, double *t, double *background, size_t nlights, triple *lights, double *diffuse, double *ambient, double *specular, bool viewportlighting, bool view); // PRC output bool shipout3(const string& prefix); bool reloadPDF(const string& Viewer, const string& outname) const; picture *transformed(const transform& t); picture *transformed(const vm::array& t); bool null() { return nodes.empty(); } }; inline picture *transformed(const transform& t, picture *p) { return p->transformed(t); } inline picture *transformed(const vm::array& t, picture *p) { return p->transformed(t); } void texinit(); int opentex(const string& texname, const string& prefix); const char *texpathmessage(); } //namespace camp #endif |