12 |
*/ |
*/ |
13 |
public class GLSpans { |
public class GLSpans { |
14 |
/** A rectangle in a texture. |
/** A rectangle in a texture. |
15 |
|
* XXX Make data members final |
16 |
*/ |
*/ |
17 |
static public class Rect { |
static public class Rect { |
18 |
public int texId; |
public int texId; |
19 |
public float x0, y0, x1, y1; |
public float x0, y0, x1, y1; |
20 |
|
/** Width and height in points. |
21 |
|
*/ |
22 |
|
public float w, h; |
23 |
}; |
}; |
24 |
static HashMap pages = new HashMap(); |
static HashMap pages = new HashMap(); |
25 |
|
|
58 |
r.x1 = (float)rect.rect.getTexCoord(0, resmult * (p.x+d.width) / rect.w); |
r.x1 = (float)rect.rect.getTexCoord(0, resmult * (p.x+d.width) / rect.w); |
59 |
r.y0 = (float)rect.rect.getTexCoord(1, resmult * p.y / rect.h); |
r.y0 = (float)rect.rect.getTexCoord(1, resmult * p.y / rect.h); |
60 |
r.y1 = (float)rect.rect.getTexCoord(1, resmult * (p.y+d.height) / rect.h); |
r.y1 = (float)rect.rect.getTexCoord(1, resmult * (p.y+d.height) / rect.h); |
61 |
|
r.w = d.width; |
62 |
|
r.h = d.height; |
63 |
|
|
64 |
pages.put(span, r); |
pages.put(span, r); |
65 |
} |
} |