| 1 |
|
| 2 |
package org.freehep.graphicsio.cgm; |
| 3 |
|
| 4 |
import java.awt.geom.Point2D; |
| 5 |
import java.io.IOException; |
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 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 |
} |