Debian Codegraph @

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

raw symbols SCIP
1 // Copyright 2001, FreeHEP.
2 package org.freehep.graphicsio.cgm;
3
4 import java.awt.geom.Point2D;
5 import java.io.IOException;
6
7 /**
8 * CircularArc3PointClose TAG.
9 *
10 * @author Mark Donszelmann
11 * @author Charles Loomis
12 * @version $Id: freehep-graphicsio-cgm/src/main/java/org/freehep/graphicsio/cgm/CircularArc3PointClose.java 278fac7cefaa 2005/12/05 04:00:43 duns $
13 */
14 public class CircularArc3PointClose extends CircularArc3Point {
15
16 public final static int PIE = 0;
17
18 public final static int CHORD = 1;
19
20 private int closure;
21
22 public CircularArc3PointClose() {
23 super(4, 14, 1);
24 }
25
26 public CircularArc3PointClose(Point2D ps, Point2D pi, Point2D pe,
27 int closure) {
28 this();
29 this.ps = ps;
30 this.pi = pi;
31 this.pe = pe;
32 this.closure = closure;
33 }
34
35 public void write(int tagID, CGMOutputStream cgm) throws IOException {
36 super.write(tagID, cgm);
37
38 cgm.writeEnumerate(closure);
39 }
40
41 public void write(int tagID, CGMWriter cgm) throws IOException {
42 cgm.print("ARC3PTCLOSE ");
43 writeArcSpec(cgm);
44 cgm.print((closure == PIE) ? " PIE" : " CHORD");
45 }
46 }