v0.5.0a: fixed alignment inconsistency in renderedtext

This commit is contained in:
Evan Debenham 2017-02-13 00:36:09 -05:00
parent dfd964621e
commit 970c6cc791
2 changed files with 6 additions and 6 deletions

View File

@ -119,11 +119,11 @@ public class SmartTexture extends Texture {
bitmap = null;
}
public RectF uvRect( int left, int top, int right, int bottom ) {
public RectF uvRect( float left, float top, float right, float bottom ) {
return new RectF(
(float)left / width,
(float)top / height,
(float)right / width,
(float)bottom / height );
left / width,
top / height,
right / width,
bottom / height );
}
}

View File

@ -190,7 +190,7 @@ public class RenderedText extends Image {
r.texture = new SmartTexture(bitmap, Texture.NEAREST, Texture.CLAMP, true);
RectF rect = r.texture.uvRect(0, 0, (int)r.width, (int)r.height);
RectF rect = r.texture.uvRect(0, 0, r.width, r.height);
r.frame(rect);
r.cache = new CachedText();