1
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
14
15
16
17
18 public class PolyBezierTo16 extends PolyBezierTo {
19
20 public PolyBezierTo16() {
21 super(88, 1, null, 0, null);
22 }
23
24 public PolyBezierTo16(Rectangle bounds, int numberOfPoints, Point[] points) {
25 super(88, 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 PolyBezierTo16(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 }