FrameDispInfo.java
1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.text;
import com.adobe.xfa.text.FrameHelper;
import com.adobe.xfa.text.TextFrame;
import com.adobe.xfa.text.TextSparseStream;
import com.adobe.xfa.ut.CoordPair;
import com.adobe.xfa.ut.Rect;
import com.adobe.xfa.ut.UnitSpan;
class FrameDispInfo
extends FrameHelper {
private Rect moExtent;
private boolean mbExtended;
private boolean mbStarted;
public FrameDispInfo(TextSparseStream poStream, boolean bExtended, int eProcess) {
super(poStream, eProcess);
this.mbExtended = bExtended;
}
public FrameDispInfo(TextSparseStream poStream, boolean bExtended) {
this(poStream, bExtended, 0);
}
public Rect getExtent() {
return this.moExtent;
}
@Override
protected boolean processOneFrame(TextFrame poFrame) {
if (poFrame != null) {
if (!this.mbStarted) {
this.mbStarted = true;
this.moExtent = poFrame.runtimeExtent(this.mbExtended);
} else {
Rect oFrameExtent = poFrame.runtimeExtent(this.mbExtended);
oFrameExtent = oFrameExtent.add(new CoordPair(UnitSpan.ZERO, this.getOffset()));
this.moExtent = this.moExtent == null ? oFrameExtent : this.moExtent.union(oFrameExtent);
}
}
return true;
}
}