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: Graphics state operator: cm.
09: @author Nassib Nassar
10: */
11: public class Xcm extends PageMarkOperator {
12:
13: public Xcm(PjNumber a, PjNumber b, PjNumber c, PjNumber d,
14: PjNumber e, PjNumber f) {
15: _a = a;
16: _b = b;
17: _c = c;
18: _d = d;
19: _e = e;
20: _f = f;
21: }
22:
23: public PjNumber getA() {
24: return _a;
25: }
26:
27: public PjNumber getB() {
28: return _b;
29: }
30:
31: public PjNumber getC() {
32: return _c;
33: }
34:
35: public PjNumber getD() {
36: return _d;
37: }
38:
39: public PjNumber getE() {
40: return _e;
41: }
42:
43: public PjNumber getF() {
44: return _f;
45: }
46:
47: public long writePdf(OutputStream os) throws IOException {
48: long z = _a.writePdf(os);
49: z = z + write(os, ' ');
50: z = z + _b.writePdf(os);
51: z = z + write(os, ' ');
52: z = z + _c.writePdf(os);
53: z = z + write(os, ' ');
54: z = z + _d.writePdf(os);
55: z = z + write(os, ' ');
56: z = z + _e.writePdf(os);
57: z = z + write(os, ' ');
58: z = z + _f.writePdf(os);
59: z = z + writeln(os, " cm");
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 Xcm) {
76: return ((_a.equals(((Xcm) obj)._a))
77: && (_b.equals(((Xcm) obj)._b))
78: && (_c.equals(((Xcm) obj)._c))
79: && (_d.equals(((Xcm) obj)._d))
80: && (_e.equals(((Xcm) obj)._e)) && (_f
81: .equals(((Xcm) obj)._f)));
82: } else {
83: return false;
84: }
85: }
86:
87: private PjNumber _a;
88: private PjNumber _b;
89: private PjNumber _c;
90: private PjNumber _d;
91: private PjNumber _e;
92: private PjNumber _f;
93:
94: }
|