summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/drawelement.h
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-04-19 23:59:33 +0000
committerKarl Berry <karl@freefriends.org>2010-04-19 23:59:33 +0000
commitdddce3148a2bc785603576b18ffcf72d39adbe47 (patch)
tree14f4c79ef11bcf0820a8d4ff2ab0c5ac009c365c /Build/source/utils/asymptote/drawelement.h
parenta01e51b01f5819b6091af48cdca581e9f2a9282e (diff)
asy 1.93
git-svn-id: svn://tug.org/texlive/trunk@17934 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/drawelement.h')
-rw-r--r--Build/source/utils/asymptote/drawelement.h42
1 files changed, 31 insertions, 11 deletions
diff --git a/Build/source/utils/asymptote/drawelement.h b/Build/source/utils/asymptote/drawelement.h
index bdc7d2b020e..44e739b74e9 100644
--- a/Build/source/utils/asymptote/drawelement.h
+++ b/Build/source/utils/asymptote/drawelement.h
@@ -19,6 +19,11 @@
#include "prcfile.h"
#include "glrender.h"
+namespace run {
+extern double *copyArrayC(const vm::array *a, size_t dim,
+ GCPlacement placement);
+}
+
namespace camp {
enum Entity {LINE=0,CURVE,SURFACE,BILLBOARD_SURFACE,nENTITY};
@@ -107,14 +112,22 @@ public:
virtual void bounds(bbox3&) {}
// Compute bounds on ratio (x,y)/z for 3d picture (not cached).
- virtual void ratio(pair &b, double (*m)(double, double), bool &first){}
+ virtual void ratio(pair &b, double (*m)(double, double), double fuzz,
+ bool &first){}
virtual bool islabel() {return false;}
-
+
virtual bool islayer() {return false;}
virtual bool is3D() {return false;}
+
+// Implement element as raw SVG code?
+ virtual bool svg() {return false;}
+
+// Implement SVG element as png image?
+ virtual bool svgpng() {return false;}
+ virtual bool beginclip() {return false;}
virtual bool endclip() {return false;}
virtual bool begingroup() {return false;}
@@ -181,6 +194,10 @@ public:
out->write(p);
}
+ virtual void writeclippath(psfile *out, bool newpath=true) {
+ out->writeclip(p,newpath);
+ }
+
virtual void writeshiftedpath(texfile *out) {
out->writeshifted(p);
}
@@ -221,16 +238,12 @@ public:
virtual void penTranslate(psfile *out)
{
- transform t=pentype.getTransform();
- if (!t.isIdentity())
- out->translate(shiftpair(t));
+ out->translate(shiftpair(pentype.getTransform()));
}
virtual void penConcat(psfile *out)
{
- transform t=pentype.getTransform();
- if (!t.isIdentity())
- out->concat(shiftless(t));
+ out->concat(shiftless(pentype.getTransform()));
}
virtual void penRestore(psfile *out)
@@ -292,9 +305,16 @@ public:
b += bpath;
}
- void writepath(psfile *out) {
- for(size_t i=0; i < size; i++)
- out->write(vm::read<path>(P,i),i == 0);
+ void writepath(psfile *out, bool newpath=true) {
+ if(size > 0) out->write(vm::read<path>(P,0),newpath);
+ for(size_t i=1; i < size; i++)
+ out->write(vm::read<path>(P,i),false);
+ }
+
+ void writeclippath(psfile *out, bool newpath=true) {
+ if(size > 0) out->writeclip(vm::read<path>(P,0),newpath);
+ for(size_t i=1; i < size; i++)
+ out->writeclip(vm::read<path>(P,i),false);
}
void writeshiftedpath(texfile *out) {