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: v.
09: @author Nassib Nassar
10: */
11: public class Xv extends PageMarkOperator {
12:
13: public Xv(PjNumber x2, PjNumber y2, PjNumber x3, PjNumber y3) {
14: _x2 = x2;
15: _y2 = y2;
16: _x3 = x3;
17: _y3 = y3;
18: }
19:
20: public PjNumber getX2() {
21: return _x2;
22: }
23:
24: public PjNumber getY2() {
25: return _y2;
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 = _x2.writePdf(os);
38: z = z + write(os, ' ');
39: z = z + _y2.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, " v");
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 Xv) {
61: return ((_x2.equals(((Xv) obj)._x2))
62: && (_y2.equals(((Xv) obj)._y2))
63: && (_x3.equals(((Xv) obj)._x3)) && (_y3
64: .equals(((Xv) obj)._y3)));
65: } else {
66: return false;
67: }
68: }
69:
70: private PjNumber _x2;
71: private PjNumber _y2;
72: private PjNumber _x3;
73: private PjNumber _y3;
74:
75: }
|