summaryrefslogtreecommitdiff
path: root/graphics/asymptote/drawlayer.h
blob: 3b5b3ddeb283dfb625eba6798235667c489fd2a3 (plain)
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