Debian Codegraph @

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

raw
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
10 /**
11 * ScaleWindowExtEx TAG.
12 *
13 * @author Mark Donszelmann
14 * @version $Id: freehep-graphicsio-emf/src/main/java/org/freehep/graphicsio/emf/gdi/ScaleWindowExtEx.java c0f15e7696d3 2007/01/22 19:26:48 duns $
15 */
16 public class ScaleWindowExtEx extends EMFTag {
17
18 private int xNum, xDenom, yNum, yDenom;
19
20 public ScaleWindowExtEx() {
21 super(32, 1);
22 }
23
24 public ScaleWindowExtEx(int xNum, int xDenom, int yNum, int yDenom) {
25 this();
26 this.xNum = xNum;
27 this.xDenom = xDenom;
28 this.yNum = yNum;
29 this.yDenom = yDenom;
30 }
31
32 public EMFTag read(int tagID, EMFInputStream emf, int len)
33 throws IOException {
34
35 return new ScaleWindowExtEx(
36 emf.readLONG(),
37 emf.readLONG(),
38 emf.readLONG(),
39 emf.readLONG());
40 }
41
42 public void write(int tagID, EMFOutputStream emf) throws IOException {
43 emf.writeLONG(xNum);
44 emf.writeLONG(xDenom);
45 emf.writeLONG(yNum);
46 emf.writeLONG(yDenom);
47 }
48
49 public String toString() {
50 return super.toString() +
51 "\n xNum: " + xNum +
52 "\n xDenom: " + xDenom +
53 "\n yNum: " + yNum +
54 "\n yDenom: " + yDenom;
55 }
56 }