2 #include "oxygine-include.h" 4 #include "core/Texture.h" 5 #include "core/NativeTexture.h" 12 Diffuse(): premultiplied(
true) {}
14 spNativeTexture alpha;
23 const unsigned char* data;
31 AnimationFrame() : _srcRect(0, 0, 1, 1), _destRect(0, 0, 1, 1), _resAnim(0), _row(0), _column(0) {}
36 void init2(
ResAnim* rs,
short column,
short row,
const Diffuse& df,
44 float getWidth()
const {
return _frameSize.x;}
45 float getHeight()
const {
return _frameSize.y;}
47 ResAnim* getResAnim()
const {
return _resAnim;}
48 short getColumn()
const {
return _column;}
49 short getRow()
const {
return _row;}
50 const RectF& getSrcRect()
const {
return _srcRect;}
51 const RectF& getDestRect()
const {
return _destRect;}
52 const Diffuse& getDiffuse()
const {
return _diffuse;}
53 const HitTestData& getHitTestData()
const {
return _hittest; }
55 void setSrcRect(
const RectF& r) {_srcRect = r;}
56 void setDestRect(
const RectF& r) {_destRect = r;}
57 void setResAnim(ResAnim* rs) {_resAnim = rs;}
58 void setDiffuse(
const Diffuse& d) { _diffuse = d; }
59 void setSize(
const Vector2& size) {_frameSize = size;}
60 void setSize(
float w,
float h) { setSize(Vector2(w, h)); }
61 void setHitTestData(
const HitTestData& ad) { _hittest = ad; }
62 void setRow(
int v) {_row = v;}
63 void setColumn(
int v) {_column = v;}
const Vector2 & getSize() const
Definition: AnimationFrame.h:43
Definition: AnimationFrame.h:18
Definition: AnimationFrame.h:28
–oxgl-end–!
Definition: Actor.h:14
AnimationFrame getClipped(const RectF &rect) const
Definition: AnimationFrame.h:9