100 |
*/ |
*/ |
101 |
public final float x0, y0, x1, y1; |
public final float x0, y0, x1, y1; |
102 |
|
|
103 |
|
|
104 |
private float pixelmult; |
private float pixelmult; |
105 |
|
|
106 |
/** Cause the texture to be |
/** Cause the texture to be |
111 |
* of the drawn area. |
* of the drawn area. |
112 |
*/ |
*/ |
113 |
public GL.Texture getTexture(float importance, float pixels) { |
public GL.Texture getTexture(float importance, float pixels) { |
114 |
return page.getTexture(importance, pixelmult * pixels); |
GL.Texture tex = page.getTexture(importance, pixelmult * pixels); |
115 |
|
String er = GLUtil.checkMipmap(tex); |
116 |
|
if(er != null) { |
117 |
|
pa("MIPMAPS NOT CONSISTENT! "+er+" "+page); |
118 |
|
} |
119 |
|
return tex; |
120 |
} |
} |
121 |
|
|
122 |
private SpanRect(SpanPage page, PageSpan sp) { |
private SpanRect(SpanPage page, PageSpan sp) { |
134 |
|
|
135 |
} |
} |
136 |
|
|
137 |
Map span2rect = new WeakHashMap(); |
static Map span2rect = new WeakHashMap(); |
138 |
|
|
139 |
Map sb2spansb = new WeakHashMap(); |
static Map sb2spansb = new WeakHashMap(); |
140 |
|
|
141 |
/** Get the texrect for a given pagespan. |
/** Get the texrect for a given pagespan. |
142 |
* This method will return immediately, either |
* This method will return immediately, either |
147 |
* 1 = at focus, 0 = very peripheral |
* 1 = at focus, 0 = very peripheral |
148 |
* @param pixScale The number of pixels per imagespan unit: the resolution needed. |
* @param pixScale The number of pixels per imagespan unit: the resolution needed. |
149 |
*/ |
*/ |
150 |
SpanRect getSpanRect(PageSpan sp, float importance, float pixScale) { |
public static SpanRect getSpanRect(PageSpan sp) { |
151 |
SpanRect r = (SpanRect)span2rect.get(sp); |
SpanRect r = (SpanRect)span2rect.get(sp); |
152 |
if(r == null) { |
if(r == null) { |
153 |
PageImageScroll sb = (PageImageScroll)sp.getScrollBlock(); |
PageImageScroll sb = (PageImageScroll)sp.getScrollBlock(); |