forked from vectorgraphics/asymptote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
drawlayer.h
45 lines (32 loc) · 773 Bytes
/
drawlayer.h
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
/*****
* 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