2 #include "oxygine-include.h" 3 #include "core/Texture.h" 5 #include "res/ResAnim.h" 7 #include "AnimationFrame.h" 8 #include "VisualStyle.h" 13 DECLARE_SMART(Sprite, spSprite);
18 DECLARE_COPYCLONE_NEW(
Sprite);
24 RectF getDestRect()
const override;
25 const Diffuse& getDiffuse()
const {
return _frame.getDiffuse();}
26 bool getManageResAnim()
const {
return (_flags & flag_manageResAnim) != 0;}
27 const RectF& getSrcRect()
const {
return _frame.getSrcRect();}
28 const ResAnim* getResAnim()
const {
return _frame.getResAnim();}
29 int getColumn()
const {
return _frame.getColumn();}
30 int getRow()
const {
return _frame.getRow();}
31 const Vector2& getLocalScale()
const {
return _localScale; }
39 virtual void setResAnim(
const ResAnim* resanim,
int col = 0,
int row = 0);
41 void setColumn(
int column);
42 void setColumnRow(
int column,
int row);
43 void setLocalScale(
const Vector2& s);
45 bool isOn(
const Vector2& localPosition,
float localScale)
override;
47 bool isFlippedX()
const {
return (_flags & flag_flipX) != 0;}
48 bool isFlippedY()
const {
return (_flags & flag_flipY) != 0;}
49 void setFlippedX(
bool flippedX);
50 void setFlippedY(
bool flippedY);
51 void setFlipped(
bool flippedX,
bool flippedY);
57 std::string
dump(
const dumpOptions&)
const override;
63 flag_manageResAnim = flag_last << 1,
64 flag_flipX = flag_last << 2,
65 flag_flipY = flag_last << 3
69 void sizeChanged(
const Vector2& size)
override;
76 EDITOR_INCLUDE(Sprite);
Definition: Serialize.h:28
Definition: RenderState.h:27
Definition: AnimationFrame.h:28
Definition: Serialize.h:21
–oxgl-end–!
Definition: Actor.h:14
bool isOn(const Vector2 &localPosition, float localScale) override
Definition: VisualStyle.h:29
void setAnimFrame(const AnimationFrame &f)
Definition: TweenAnim.h:13
std::string dump(const dumpOptions &) const override
Definition: AnimationFrame.h:9
void setManageResAnim(bool manage)