Debian Codegraph @

freehep-graphicsio-emf/src/main/java/org/freehep/graphicsio/emf/gdi/SetPixelV.java

raw
1 // Copyright 2002, FreeHEP.
2 package org.freehep.graphicsio.emf.gdi;
3
4 import java.awt.Color;
5 import java.awt.Point;
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 * SetPixelV TAG.
14 *
15 * @author Mark Donszelmann
16 * @version $Id: freehep-graphicsio-emf/src/main/java/org/freehep/graphicsio/emf/gdi/SetPixelV.java c0f15e7696d3 2007/01/22 19:26:48 duns $
17 */
18 public class SetPixelV extends EMFTag {
19
20 private Point point;
21
22 private Color color;
23
24 public SetPixelV() {
25 super(15, 1);
26 }
27
28 public SetPixelV(Point point, Color color) {
29 this();
30 this.point = point;
31 this.color = color;
32 }
33
34 public EMFTag read(int tagID, EMFInputStream emf, int len)
35 throws IOException {
36
37 return new SetPixelV(emf.readPOINTL(), emf.readCOLORREF());
38 }
39
40 public void write(int tagID, EMFOutputStream emf) throws IOException {
41 emf.writePOINTL(point);
42 emf.writeCOLORREF(color);
43 }
44
45 public String toString() {
46 return super.toString() +
47 "\n point: " + point +
48 "\n color: " + color;
49 }
50 }