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: c.
09: @author Nassib Nassar
10: */
11: public class Xc extends PageMarkOperator {
12:
13: public Xc(PjNumber x1, PjNumber y1, PjNumber x2, PjNumber y2,
14: PjNumber x3, PjNumber y3) {
15: _x1 = x1;
16: _y1 = y1;
17: _x2 = x2;
18: _y2 = y2;
19: _x3 = x3;
20: _y3 = y3;
21: }
22:
23: public PjNumber getX1() {
24: return _x1;
25: }
26:
27: public PjNumber getY1() {
28: return _y1;
29: }
30:
31: public PjNumber getX2() {
32: return _x2;
33: }
34:
35: public PjNumber getY2() {
36: return _y2;
37: }
38:
39: public PjNumber getX3() {
40: return _x3;
41: }
42:
43: public PjNumber getY3() {
44: return _y3;
45: }
46:
47: public long writePdf(OutputStream os) throws IOException {
48: long z = _x1.writePdf(os);
49: z = z + write(os, ' ');
50: z = z + _y1.writePdf(os);
51: z = z + write(os, ' ');
52: z = z + _x2.writePdf(os);
53: z = z + write(os, ' ');
54: z = z + _y2.writePdf(os);
55: z = z + write(os, ' ');
56: z = z + _x3.writePdf(os);
57: z = z + write(os, ' ');
58: z = z + _y3.writePdf(os);
59: z = z + writeln(os, " c");
60: return z;
61: }
62:
63: /**
64: Returns a deep copy of this object.
65: @return a deep copy of this object.
66: */
67: public Object clone() {
68: return this ;
69: }
70:
71: public boolean equals(Object obj) {
72: if (obj == null) {
73: return false;
74: }
75: if (obj instanceof Xc) {
76: return ((_x1.equals(((Xc) obj)._x1))
77: && (_y1.equals(((Xc) obj)._y1))
78: && (_x2.equals(((Xc) obj)._x2))
79: && (_y2.equals(((Xc) obj)._y2))
80: && (_x3.equals(((Xc) obj)._x3)) && (_y3
81: .equals(((Xc) obj)._y3)));
82: } else {
83: return false;
84: }
85: }
86:
87: private PjNumber _x1;
88: private PjNumber _y1;
89: private PjNumber _x2;
90: private PjNumber _y2;
91: private PjNumber _x3;
92: private PjNumber _y3;
93:
94: }
|