1
2 package org.freehep.graphicsio.emf.gdi;
3
4 import java.awt.Rectangle;
5 import java.io.IOException;
6
7 import org.freehep.graphicsio.emf.EMFInputStream;
8 import org.freehep.graphicsio.emf.EMFOutputStream;
9 import org.freehep.graphicsio.emf.EMFTag;
10
11
12
13
14
15
16
17 public class ExcludeClipRect extends EMFTag {
18
19 private Rectangle bounds;
20
21 public ExcludeClipRect() {
22 super(29, 1);
23 }
24
25 public ExcludeClipRect(Rectangle bounds) {
26 this();
27 this.bounds = bounds;
28 }
29
30 public EMFTag read(int tagID, EMFInputStream emf, int len)
31 throws IOException {
32
33 return new ExcludeClipRect(emf.readRECTL());
34 }
35
36 public void write(int tagID, EMFOutputStream emf) throws IOException {
37 emf.writeRECTL(bounds);
38 }
39
40 public String toString() {
41 return super.toString() + "\n bounds: " + bounds;
42 }
43 }