Debian Codegraph @

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

raw symbols SCIP
1 // Copyright 2001, FreeHEP.
2 package org.freehep.graphicsio.cgm;
3
4 import java.io.IOException;
5
6 /**
7 * InteriorStyle TAG.
8 *
9 * @author Mark Donszelmann
10 * @author Charles Loomis
11 * @version $Id: freehep-graphicsio-cgm/src/main/java/org/freehep/graphicsio/cgm/InteriorStyle.java 278fac7cefaa 2005/12/05 04:00:43 duns $
12 */
13 public class InteriorStyle extends CGMTag {
14
15 public static final int HOLLOW = 0;
16
17 public static final int SOLID = 1;
18
19 public static final int PATTERN = 2;
20
21 public static final int HATCH = 3;
22
23 public static final int EMPTY = 4;
24
25 public static final int GEOMETRIC_PATTERN = 5;
26
27 public static final int INTERPOLATED = 6;
28
29 private int style;
30
31 public InteriorStyle() {
32 super(5, 22, 1);
33 }
34
35 public InteriorStyle(int style) {
36 this();
37 this.style = style;
38 }
39
40 public void write(int tagID, CGMOutputStream cgm) throws IOException {
41 cgm.writeEnumerate(style);
42 }
43
44 public void write(int tagID, CGMWriter cgm) throws IOException {
45 cgm.print("INTSTYLE ");
46 switch (style) {
47 default:
48 case HOLLOW:
49 cgm.print("HOLLOW");
50 break;
51 case SOLID:
52 cgm.print("SOLID");
53 break;
54 case PATTERN:
55 cgm.print("PAT");
56 break;
57 case HATCH:
58 cgm.print("HATCH");
59 break;
60 case EMPTY:
61 cgm.print("EMPTY");
62 break;
63 case GEOMETRIC_PATTERN:
64 cgm.print("GEOPAT");
65 break;
66 case INTERPOLATED:
67 cgm.print("INTERP");
68 break;
69 }
70 }
71 }