Debian Codegraph @

freehep-graphicsio-cgm/src/main/java/org/freehep/graphicsio/cgm/TextPath.java

raw symbols SCIP
1 // Copyright 2001, FreeHEP.
2 package org.freehep.graphicsio.cgm;
3
4 import java.io.IOException;
5
6 /**
7 * TextPath TAG.
8 *
9 * @author Mark Donszelmann
10 * @author Charles Loomis
11 * @version $Id: freehep-graphicsio-cgm/src/main/java/org/freehep/graphicsio/cgm/TextPath.java 278fac7cefaa 2005/12/05 04:00:43 duns $
12 */
13 public class TextPath extends CGMTag {
14
15 public static final int RIGHT = 0;
16
17 public static final int LEFT = 1;
18
19 public static final int UP = 2;
20
21 public static final int DOWN = 3;
22
23 private int path;
24
25 public TextPath() {
26 super(5, 17, 1);
27 }
28
29 public TextPath(int path) {
30 this();
31 this.path = path;
32 }
33
34 public void write(int tagID, CGMOutputStream cgm) throws IOException {
35 cgm.writeEnumerate(path);
36 }
37
38 public void write(int tagID, CGMWriter cgm) throws IOException {
39 cgm.print("TEXTPATH ");
40 switch (path) {
41 default:
42 case RIGHT:
43 cgm.print("RIGHT");
44 break;
45 case LEFT:
46 cgm.print("LEFT");
47 break;
48 case UP:
49 cgm.print("UP");
50 break;
51 case DOWN:
52 cgm.print("DOWN");
53 break;
54 }
55 }
56 }