summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/picture.cc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-03-07 18:10:02 +0000
committerKarl Berry <karl@freefriends.org>2017-03-07 18:10:02 +0000
commita6dc131e8a2ff8ce660543a262d771380fdf1b4e (patch)
tree33ab70fd89ae0842cedcfce676aaa6d64a9eb7dc /Build/source/utils/asymptote/picture.cc
parent78cc0e8d7d1977f9cf5c8c9ba3d9de81ed6e03a3 (diff)
asy 2.40 sources
git-svn-id: svn://tug.org/texlive/trunk@43422 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/picture.cc')
-rw-r--r--Build/source/utils/asymptote/picture.cc33
1 files changed, 8 insertions, 25 deletions
diff --git a/Build/source/utils/asymptote/picture.cc b/Build/source/utils/asymptote/picture.cc
index c3c6d4b3232..8799274be04 100644
--- a/Build/source/utils/asymptote/picture.cc
+++ b/Build/source/utils/asymptote/picture.cc
@@ -14,6 +14,7 @@
#include "drawverbatim.h"
#include "drawlabel.h"
#include "drawlayer.h"
+#include "drawsurface.h"
using std::ifstream;
using std::ofstream;
@@ -45,6 +46,8 @@ texstream::~texstream() {
namespace camp {
+extern void draw();
+
bool isIdTransform3(const double* t)
{
return (t == NULL || (t[0]==1 && t[1]==0 && t[2]==0 && t[3]==0 &&
@@ -109,30 +112,6 @@ void multiplyTransform3(double*& t, const double* s, const double* r)
}
}
-void boundstriples(double& x, double& y, double& z, double& X, double& Y,
- double& Z, size_t n, const triple* v)
-{
- if(n == 0 || v == NULL)
- return;
-
- X=x=v[0].getx();
- Y=y=v[0].gety();
- Z=z=v[0].getz();
-
- for(size_t i=1; i < n; ++i) {
- const triple vi=v[i];
- const double vx=vi.getx();
- x=min(x,vx);
- X=max(X,vx);
- const double vy=vi.gety();
- y=min(y,vy);
- Y=max(Y,vy);
- const double vz=vi.getz();
- z=min(z,vz);
- Z=max(Z,vz);
- }
-}
-
double xratio(const triple& v) {return v.getx()/v.getz();}
double yratio(const triple& v) {return v.gety()/v.getz();}
@@ -789,7 +768,8 @@ bool picture::shipout(picture *preamble, const string& Prefix,
bool pdf=settings::pdf(texengine);
bool standardout=Prefix == "-";
- string prefix=standardout ? standardprefix : Prefix;
+ string prefix=standardout ? standardprefix : stripExt(Prefix);
+
string preformat=nativeformat();
string outputformat=format.empty() ? defaultformat() : format;
bool epsformat=outputformat == "eps";
@@ -1080,6 +1060,9 @@ void picture::render(GLUnurbs *nurb, double size2,
assert(*p);
(*p)->render(nurb,size2,Min,Max,perspective,lighton,transparent);
}
+#ifdef HAVE_GL
+ drawBezierPatch::S.draw();
+#endif
}
struct Communicate : public gc {