summaryrefslogtreecommitdiff
path: root/graphics/asymptote/drawlayer.h
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /graphics/asymptote/drawlayer.h
Initial commit
Diffstat (limited to 'graphics/asymptote/drawlayer.h')
-rw-r--r--graphics/asymptote/drawlayer.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/graphics/asymptote/drawlayer.h b/graphics/asymptote/drawlayer.h
new file mode 100644
index 0000000000..1f4500dac2
--- /dev/null
+++ b/graphics/asymptote/drawlayer.h
@@ -0,0 +1,45 @@
+/*****
+ * drawlayer.h
+ * John Bowman
+ *
+ * Start a new postscript/TeX layer in picture.
+ *****/
+
+#ifndef DRAWLAYER_H
+#define DRAWLAYER_H
+
+#include "drawelement.h"
+
+namespace camp {
+
+class drawLayer : public drawElement {
+public:
+ drawLayer() {}
+
+ virtual ~drawLayer() {}
+
+ bool islayer() {return true;}
+};
+
+class drawNewPage : public drawLayer {
+public:
+ drawNewPage() {}
+
+ virtual ~drawNewPage() {}
+
+ bool islabel() {return true;}
+ bool isnewpage() {return true;}
+
+ bool write(texfile *out, const bbox&) {
+ out->verbatimline(settings::latex(out->texengine) ? "\\newpage" :
+ settings::context(out->texengine) ? "}\\page\\hbox{%" :
+ "\\eject");
+ return true;
+ }
+};
+
+}
+
+GC_DECLARE_PTRFREE(camp::drawLayer);
+
+#endif