1
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
9
10
11
12
13
14
15 public class GradientRectangle extends Gradient {
16
17 private int upperLeft, lowerRight;
18
19 public GradientRectangle(int upperLeft, int lowerRight) {
20 this.upperLeft = upperLeft;
21 this.lowerRight = lowerRight;
22 }
23
24 public GradientRectangle(EMFInputStream emf) throws IOException {
25 upperLeft = emf.readULONG();
26 lowerRight = emf.readULONG();
27 }
28
29 public void write(EMFOutputStream emf) throws IOException {
30 emf.writeULONG(upperLeft);
31 emf.writeULONG(lowerRight);
32 }
33
34 public String toString() {
35 return " GradientRectangle: " + upperLeft + ", " + lowerRight;
36 }
37 }