OSDN Git Service

[updated] AssetManager, removed exception printStackTrace.
[mikumikustudio/libgdx-mikumikustudio.git] / gdx / src / com / badlogic / gdx / graphics / g2d / TextureRegion.java
index 4a43ebf..06aad29 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 - u) * texture.getWidth());\r
+               return (int)(u2 * texture.getWidth() - 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 - v) * texture.getHeight());\r
+               return (int)(v2 * texture.getHeight() - v * texture.getHeight());\r
        }\r
 \r
        public void setRegionHeight (int height) {\r