2
0
Эх сурвалжийг харах

solve issue #2015 (Picture class lacks 2 getters)

Stephen Gold 2 жил өмнө
parent
commit
ac4c76364e

+ 19 - 1
jme3-core/src/main/java/com/jme3/ui/Picture.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine
+ * Copyright (c) 2009-2023 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -86,6 +86,24 @@ public class Picture extends Geometry {
     protected Picture(){
     }
 
+    /**
+     * Return the height of the picture.
+     *
+     * @return the height (in pixels)
+     */
+    public float getHeight() {
+        return height;
+    }
+
+    /**
+     * Return the width of the picture.
+     *
+     * @return the width (in pixels)
+     */
+    public float getWidth() {
+        return width;
+    }
+
     /**
      * Set the width in pixels of the picture, if the width
      * does not match the texture's width, then the texture will