OSDN Git Service

Scene2d refactoring + more.
[mikumikustudio/libgdx-mikumikustudio.git] / gdx / src / com / badlogic / gdx / graphics / g2d / TextureRegion.java
index 06aad29..7f58fe9 100644 (file)
@@ -152,7 +152,7 @@ public class TextureRegion {
 \r
        /** Returns the region's width. May be negative if the texture region is flipped horizontally. */\r
        public int getRegionWidth () {\r
-               return (int)(u2 * texture.getWidth() - u * texture.getWidth());\r
+               return (int)(u2 * texture.getWidth()) - (int)(u * texture.getWidth());\r
        }\r
 \r
        public void setRegionWidth (int width) {\r
@@ -161,7 +161,7 @@ public class TextureRegion {
 \r
        /** Returns the region's height. May be negative if the texture region is flipped horizontally. */\r
        public int getRegionHeight () {\r
-               return (int)(v2 * texture.getHeight() - v * texture.getHeight());\r
+               return (int)(v2 * texture.getHeight()) - (int)(v * texture.getHeight());\r
        }\r
 \r
        public void setRegionHeight (int height) {\r