DocumentContext.java
1.17 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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.internal.pdftoolkit.graphicsDOM;
import java.awt.geom.GeneralPath;
import java.util.HashMap;
public abstract class DocumentContext {
private HashMap<String, HashMap<Integer, GeneralPath>> cachedGlyphOutlines = null;
public abstract void graphicsStateChanged();
public abstract void destroy();
public void cacheGlyphOutline(GeneralPath outline, int gid, String fontName) {
HashMap fontGlyphs;
if (this.cachedGlyphOutlines == null) {
this.cachedGlyphOutlines = new HashMap<K, V>();
}
if ((fontGlyphs = this.cachedGlyphOutlines.get(fontName)) == null) {
fontGlyphs = new HashMap<K, V>();
}
fontGlyphs.put(gid, outline);
this.cachedGlyphOutlines.put(fontName, fontGlyphs);
}
public GeneralPath getCachedGlyphOutline(int gid, String fontName) {
if (this.cachedGlyphOutlines == null) {
return null;
}
HashMap<Integer, GeneralPath> fontGlyphs = this.cachedGlyphOutlines.get(fontName);
if (fontGlyphs == null) {
return null;
}
return fontGlyphs.get(gid);
}
}