Browse Source

Add getScaledWidth and getScaledHeight helpers to Actor

Andrey Fidrya 10 years ago
parent
commit
183383acbc
1 changed files with 2 additions and 0 deletions
  1. 2 0
      oxygine/src/Actor.h

+ 2 - 0
oxygine/src/Actor.h

@@ -131,7 +131,9 @@ namespace oxygine
         /**Returns Size*Scale*/
         /**Returns Size*Scale*/
         Vector2             getScaledSize() const { return _size.mult(_scale); }
         Vector2             getScaledSize() const { return _size.mult(_scale); }
         float               getWidth() const {return getSize().x;}
         float               getWidth() const {return getSize().x;}
+        float               getScaledWidth() const {return getSize().x * _scale.x;}
         float               getHeight() const {return getSize().y;}
         float               getHeight() const {return getSize().y;}
+        float               getScaledHeight() const {return getSize().y * _scale.y;}
         unsigned char       getAlpha() const {return _alpha;}
         unsigned char       getAlpha() const {return _alpha;}
         const spClock&      getClock() const;
         const spClock&      getClock() const;
         virtual RectF       getDestRect() const;
         virtual RectF       getDestRect() const;