Debian Codegraph @

freehep-graphicsio-cgm/src/main/java/org/freehep/graphicsio/cgm/CircularArcCentreClose.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 * CircularArcCentreClose TAG.
9 *
10 * @author Mark Donszelmann
11 * @author Charles Loomis
12 * @version $Id: freehep-graphicsio-cgm/src/main/java/org/freehep/graphicsio/cgm/CircularArcCentreClose.java 278fac7cefaa 2005/12/05 04:00:43 duns $
13 */
14 public class CircularArcCentreClose extends CircularArcCentre {
15
16 public final static int PIE = 0;
17
18 public final static int CHORD = 1;
19
20 private int closure;
21
22 public CircularArcCentreClose() {
23 super(4, 16, 1);
24 }
25
26 public CircularArcCentreClose(Point2D p, Point2D dps, Point2D dpe,
27 double radius, int closure) {
28 this();
29 this.p = p;
30 this.dps = dps;
31 this.dpe = dpe;
32 this.radius = radius;
33 this.closure = closure;
34 }
35
36 public void write(int tagID, CGMOutputStream cgm) throws IOException {
37 super.write(tagID, cgm);
38 cgm.writeEnumerate(closure);
39 }
40
41 public void write(int tagID, CGMWriter cgm) throws IOException {
42 cgm.print("ARCCTRCLOSE ");
43 writeArcSpec(cgm);
44 cgm.print((closure == PIE) ? " PIE" : " CHORD");
45 }
46 }