1 |
|
2 |
package org.freehep.graphicsio.emf.gdiplus; |
3 |
|
4 |
import java.awt.Color; |
5 |
import java.io.IOException; |
6 |
|
7 |
import org.freehep.graphicsio.emf.EMFInputStream; |
8 |
import org.freehep.graphicsio.emf.EMFOutputStream; |
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
@author |
15 |
@version |
16 |
|
17 |
public class Clear extends EMFPlusTag { |
18 |
|
19 |
private Color color = null; |
20 |
|
21 |
public Clear() { |
22 |
super(9, 1); |
23 |
} |
24 |
|
25 |
public Clear(Color color) { |
26 |
this(); |
27 |
flags = 0; |
28 |
this.color = color; |
29 |
} |
30 |
|
31 |
public EMFPlusTag read(int tagID, int flags, EMFInputStream emf, int len) |
32 |
throws IOException { |
33 |
Clear tag = new Clear(); |
34 |
tag.flags = flags; |
35 |
tag.color = emf.readCOLOR(); |
36 |
return tag; |
37 |
} |
38 |
|
39 |
public void write(int tagID, int flags, EMFOutputStream emf) throws IOException { |
40 |
emf.writeCOLOR(color); |
41 |
} |
42 |
|
43 |
public String toString() { |
44 |
return super.toString()+"\n color: "+color; |
45 |
} |
46 |
} |