| 1 |
// Copyright 2002, FreeHEP. |
| 2 |
package org.freehep.graphicsio.emf.gdi; |
| 3 |
|
| 4 |
import java.io.IOException; |
| 5 |
|
| 6 |
import org.freehep.graphicsio.emf.EMFInputStream; |
| 7 |
import org.freehep.graphicsio.emf.EMFOutputStream; |
| 8 |
import org.freehep.graphicsio.emf.EMFTag; |
| 9 |
import org.freehep.graphicsio.emf.EMFRenderer; |
| 10 |
|
| 11 |
/** |
| 12 |
* Rectangle TAG. |
| 13 |
* |
| 14 |
* @author Mark Donszelmann |
| 15 |
* @version $Id: freehep-graphicsio-emf/src/main/java/org/freehep/graphicsio/emf/gdi/EOF.java c0f15e7696d3 2007/01/22 19:26:48 duns $ |
| 16 |
*/ |
| 17 |
public class EOF extends EMFTag { |
| 18 |
|
| 19 |
public EOF() { |
| 20 |
super(14, 1); |
| 21 |
} |
| 22 |
|
| 23 |
public EMFTag read(int tagID, EMFInputStream emf, int len) |
| 24 |
throws IOException { |
| 25 |
|
| 26 |
/* int[] bytes = */ emf.readUnsignedByte(len); |
| 27 |
return new EOF(); |
| 28 |
} |
| 29 |
|
| 30 |
public void write(int tagID, EMFOutputStream emf) throws IOException { |
| 31 |
emf.writeDWORD(0); // # of palette entries |
| 32 |
emf.writeDWORD(0x10); // offset for palette |
| 33 |
// ... palette |
| 34 |
emf.writeDWORD(0x14); // offset to start of record |
| 35 |
} |
| 36 |
|
| 37 |
/** |
| 38 |
* displays the tag using the renderer |
| 39 |
* |
| 40 |
* @param renderer EMFRenderer storing the drawing session data |
| 41 |
*/ |
| 42 |
public void render(EMFRenderer renderer) { |
| 43 |
// do nothing |
| 44 |
} |
| 45 |
} |