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: Text operator: Tf.
09: @author Nassib Nassar
10: */
11: public class XTf extends PageMarkOperator {
12:
13: public XTf(PjName name, PjNumber size) {
14: _name = name;
15: _size = size;
16: }
17:
18: public PjName getName() {
19: return _name;
20: }
21:
22: public PjNumber getSize() {
23: return _size;
24: }
25:
26: public long writePdf(OutputStream os) throws IOException {
27: long z = _name.writePdf(os);
28: z = z + write(os, ' ');
29: z = z + _size.writePdf(os);
30: z = z + writeln(os, " Tf");
31: return z;
32: }
33:
34: /**
35: Returns a deep copy of this object.
36: @return a deep copy of this object.
37: */
38: public Object clone() {
39: return this ;
40: }
41:
42: public boolean equals(Object obj) {
43: if (obj == null) {
44: return false;
45: }
46: if (obj instanceof XTf) {
47: return ((_name.equals(((XTf) obj)._name)) && (_size
48: .equals(((XTf) obj)._size)));
49: } else {
50: return false;
51: }
52: }
53:
54: private PjName _name;
55: private PjNumber _size;
56:
57: }
|