diff options
author | Karl Berry <karl@freefriends.org> | 2019-03-27 22:27:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-03-27 22:27:57 +0000 |
commit | 9121faed0cf54a08882acf41120cf28fc3a32998 (patch) | |
tree | fe7f0c5e9ed02fe4a1fc389c27c88750c2807e43 /Build/source/utils/asymptote/drawpath3.h | |
parent | b8e24fbf964b4030f68a8484a53d405869693266 (diff) |
asy 2.48 sources
git-svn-id: svn://tug.org/texlive/trunk@50622 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/drawpath3.h')
-rw-r--r-- | Build/source/utils/asymptote/drawpath3.h | 51 |
1 files changed, 45 insertions, 6 deletions
diff --git a/Build/source/utils/asymptote/drawpath3.h b/Build/source/utils/asymptote/drawpath3.h index dc5b1273967..1bf5b670b8a 100644 --- a/Build/source/utils/asymptote/drawpath3.h +++ b/Build/source/utils/asymptote/drawpath3.h @@ -16,7 +16,7 @@ namespace camp { class drawPath3 : public drawElement { protected: #ifdef HAVE_GL - BezierCurve R; + static BezierCurve R; #endif const path3 g; triple center; @@ -70,8 +70,8 @@ public: bool write(prcfile *out, unsigned int *, double, groupsmap&); - void render(GLUnurbs*, double, const triple&, const triple&, double, - bool lighton, bool transparent); + void render(double, const triple&, const triple&, double, + bool transparent); drawElement *transformed(const double* t); }; @@ -155,13 +155,52 @@ public: void ratio(const double* t, pair &b, double (*m)(double, double), double fuzz, bool &first); - void render(GLUnurbs *nurb, double size2, - const triple& Min, const triple& Max, - double perspective, bool lighton, bool transparent); + void render(double size2, const triple& Min, const triple& Max, + double perspective, bool transparent); drawElement *transformed(const double* t); }; +// Draw a pixel. +class drawPixel : public drawElement { +#ifdef HAVE_GL + Pixel R; +#endif + triple v; + pen p; + prc::RGBAColour color; + double width; + bool invisible; + triple Min,Max; +public: + drawPixel(const triple& v, const pen& p, double width, const string& key="") + : drawElement(key), v(v), p(p), color(rgba(p)), width(width), + invisible(p.invisible()) {} + + void bounds(const double* t, bbox3& B) { + Min=Max=(t != NULL) ? t*v : v; + B.add(Min); + } + + void ratio(const double* t, pair &b, double (*m)(double, double), double, + bool &first) { + triple V=(t != NULL) ? t*v : v; + pair z=pair(xratio(V),yratio(V)); + + if(first) { + b=z; + first=false; + } else b=pair(m(b.getx(),z.getx()),m(b.gety(),z.gety())); + } + + void render(double size2, const triple& b, const triple& B, + double perspective, bool transparent); + + bool write(prcfile *out, unsigned int *, double, groupsmap&); + + drawElement *transformed(const double* t); +}; + } #endif |