v0.5.0a: fixed alignment inconsistency in renderedtext
This commit is contained in:
parent
dfd964621e
commit
970c6cc791
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user