| 1 |
// Copyright 2002, FreeHEP. |
| 2 |
package org.freehep.graphicsio.emf.gdi; |
| 3 |
|
| 4 |
import java.awt.Point; |
| 5 |
import java.awt.Rectangle; |
| 6 |
import java.io.IOException; |
| 7 |
|
| 8 |
import org.freehep.graphicsio.emf.EMFInputStream; |
| 9 |
import org.freehep.graphicsio.emf.EMFOutputStream; |
| 10 |
import org.freehep.graphicsio.emf.EMFTag; |
| 11 |
|
| 12 |
/** |
| 13 |
* PolylineTo16 TAG. |
| 14 |
* |
| 15 |
* @author Mark Donszelmann |
| 16 |
* @version $Id: freehep-graphicsio-emf/src/main/java/org/freehep/graphicsio/emf/gdi/PolylineTo16.java c0f15e7696d3 2007/01/22 19:26:48 duns $ |
| 17 |
*/ |
| 18 |
public class PolylineTo16 extends PolylineTo { |
| 19 |
|
| 20 |
public PolylineTo16() { |
| 21 |
super(89, 1, null, 0, null); |
| 22 |
} |
| 23 |
|
| 24 |
public PolylineTo16(Rectangle bounds, int numberOfPoints, Point[] points) { |
| 25 |
super(89, 1, bounds, numberOfPoints, points); |
| 26 |
} |
| 27 |
|
| 28 |
public EMFTag read(int tagID, EMFInputStream emf, int len) |
| 29 |
throws IOException { |
| 30 |
|
| 31 |
Rectangle r = emf.readRECTL(); |
| 32 |
int n = emf.readDWORD(); |
| 33 |
return new PolylineTo16(r, n, emf.readPOINTS(n)); |
| 34 |
} |
| 35 |
|
| 36 |
public void write(int tagID, EMFOutputStream emf) throws IOException { |
| 37 |
emf.writeRECTL(getBounds()); |
| 38 |
emf.writeDWORD(getNumberOfPoints()); |
| 39 |
emf.writePOINTS(getNumberOfPoints(), getPoints()); |
| 40 |
} |
| 41 |
} |