01: package com.etymon.pj.object.pagemark;
02:
03: import java.io.*;
04: import java.util.*;
05: import com.etymon.pj.object.*;
06:
07: /**
08: Path operator: re.
09: @author Nassib Nassar
10: */
11: public class Xre extends PageMarkOperator {
12:
13: public Xre(PjNumber x, PjNumber y, PjNumber width, PjNumber height) {
14: _x = x;
15: _y = y;
16: _width = width;
17: _height = height;
18: }
19:
20: public PjNumber getX() {
21: return _x;
22: }
23:
24: public PjNumber getY() {
25: return _y;
26: }
27:
28: public PjNumber getWidth() {
29: return _width;
30: }
31:
32: public PjNumber getHeight() {
33: return _height;
34: }
35:
36: public long writePdf(OutputStream os) throws IOException {
37: long z = _x.writePdf(os);
38: z = z + write(os, ' ');
39: z = z + _y.writePdf(os);
40: z = z + write(os, ' ');
41: z = z + _width.writePdf(os);
42: z = z + write(os, ' ');
43: z = z + _height.writePdf(os);
44: z = z + writeln(os, " re");
45: return z;
46: }
47:
48: /**
49: Returns a deep copy of this object.
50: @return a deep copy of this object.
51: */
52: public Object clone() {
53: return this ;
54: }
55:
56: public boolean equals(Object obj) {
57: if (obj == null) {
58: return false;
59: }
60: if (obj instanceof Xre) {
61: return ((_x.equals(((Xre) obj)._x))
62: && (_y.equals(((Xre) obj)._y))
63: && (_width.equals(((Xre) obj)._width)) && (_height
64: .equals(((Xre) obj)._height)));
65: } else {
66: return false;
67: }
68: }
69:
70: private PjNumber _x;
71: private PjNumber _y;
72: private PjNumber _width;
73: private PjNumber _height;
74:
75: }
|