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: y.
09: @author Nassib Nassar
10: */
11: public class Xy extends PageMarkOperator {
12:
13: public Xy(PjNumber x1, PjNumber y1, PjNumber x3, PjNumber y3) {
14: _x1 = x1;
15: _y1 = y1;
16: _x3 = x3;
17: _y3 = y3;
18: }
19:
20: public PjNumber getX1() {
21: return _x1;
22: }
23:
24: public PjNumber getY1() {
25: return _y1;
26: }
27:
28: public PjNumber getX3() {
29: return _x3;
30: }
31:
32: public PjNumber getY3() {
33: return _y3;
34: }
35:
36: public long writePdf(OutputStream os) throws IOException {
37: long z = _x1.writePdf(os);
38: z = z + write(os, ' ');
39: z = z + _y1.writePdf(os);
40: z = z + write(os, ' ');
41: z = z + _x3.writePdf(os);
42: z = z + write(os, ' ');
43: z = z + _y3.writePdf(os);
44: z = z + writeln(os, " y");
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 Xy) {
61: return ((_x1.equals(((Xy) obj)._x1))
62: && (_y1.equals(((Xy) obj)._y1))
63: && (_x3.equals(((Xy) obj)._x3)) && (_y3
64: .equals(((Xy) obj)._y3)));
65: } else {
66: return false;
67: }
68: }
69:
70: private PjNumber _x1;
71: private PjNumber _y1;
72: private PjNumber _x3;
73: private PjNumber _y3;
74:
75: }
|