Debian Codegraph @

freehep-graphicsio-cgm/src/main/java/org/freehep/graphicsio/cgm/Polygon.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 * Polygon TAG.
9 *
10 * @author Mark Donszelmann
11 * @author Charles Loomis
12 * @version $Id: freehep-graphicsio-cgm/src/main/java/org/freehep/graphicsio/cgm/Polygon.java 278fac7cefaa 2005/12/05 04:00:43 duns $
13 */
14 public class Polygon extends Polyline {
15
16 public Polygon() {
17 super(4, 7, 1);
18 }
19
20 public Polygon(Point2D[] p) {
21 this();
22 this.p = p;
23 }
24
25 public void write(int tagID, CGMWriter cgm) throws IOException {
26 cgm.println("POLYGON");
27 writePointList(cgm);
28 }
29 }