Sprite.pkg 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. $#include "Sprite.h"
  2. enum BlendMode{};
  3. class Sprite : public UIElement
  4. {
  5. Sprite(Context* context);
  6. virtual ~Sprite();
  7. void SetPosition(const Vector2& position);
  8. void SetPosition(float x, float y);
  9. void SetHotSpot(const IntVector2& hotSpot);
  10. void SetHotSpot(int x, int y);
  11. void SetScale(const Vector2& scale);
  12. void SetScale(float x, float y);
  13. void SetScale(float scale);
  14. void SetRotation(float angle);
  15. void SetTexture(Texture* texture);
  16. void SetImageRect(const IntRect& rect);
  17. void SetFullImageRect();
  18. void SetBlendMode(BlendMode mode);
  19. const Vector2& GetPosition() const;
  20. const IntVector2& GetHotSpot() const;
  21. const Vector2& GetScale() const;
  22. float GetRotation() const;
  23. Texture* GetTexture() const;
  24. const IntRect& GetImageRect() const;
  25. BlendMode GetBlendMode() const;
  26. void SetTextureAttr(ResourceRef value);
  27. ResourceRef GetTextureAttr() const;
  28. const Matrix3x4& GetTransform() const;
  29. tolua_property__get_set Vector2& position;
  30. tolua_property__get_set IntVector2& hotSpot;
  31. tolua_property__get_set Vector2& scale;
  32. tolua_property__get_set float rotation;
  33. tolua_property__get_set Texture* texture;
  34. tolua_property__get_set IntRect& imageRect;
  35. tolua_property__get_set BlendMode blendMode;
  36. tolua_property__get_set ResourceRef textureAttr;
  37. tolua_readonly tolua_property__get_set Matrix3x4& transform;
  38. };