2011-01-16 00:47:37 +00:00
|
|
|
|
/********************************************************
|
|
|
|
|
* Sprite.h *
|
|
|
|
|
* *
|
|
|
|
|
* XFX Sprite definition file *
|
|
|
|
|
* Copyright <EFBFBD> XFX Team. All Rights Reserved *
|
|
|
|
|
********************************************************/
|
|
|
|
|
#ifndef _XFX_GRAPHICS_SPRITE_
|
|
|
|
|
#define _XFX_GRAPHICS_SPRITE_
|
|
|
|
|
|
|
|
|
|
#include "Color.h"
|
|
|
|
|
#include "Enums.h"
|
|
|
|
|
#include "Texture2D.h"
|
|
|
|
|
#include <Rectangle.h>
|
|
|
|
|
#include <Vector2.h>
|
|
|
|
|
|
2011-11-07 01:29:50 +00:00
|
|
|
|
using namespace System;
|
|
|
|
|
|
2011-01-16 00:47:37 +00:00
|
|
|
|
namespace XFX
|
|
|
|
|
{
|
|
|
|
|
namespace Graphics
|
|
|
|
|
{
|
2012-09-28 20:36:02 +00:00
|
|
|
|
// Internal helper class to aid drawing via the SpriteBatch.
|
|
|
|
|
class Sprite : public Object
|
2011-01-16 00:47:37 +00:00
|
|
|
|
{
|
|
|
|
|
private:
|
2012-03-29 22:02:43 +00:00
|
|
|
|
Texture2D* texture;
|
2011-01-16 00:47:37 +00:00
|
|
|
|
Rectangle destinationRectangle;
|
|
|
|
|
Rectangle sourceRectangle;
|
|
|
|
|
Color color;
|
|
|
|
|
float rotation;
|
|
|
|
|
Vector2 origin;
|
|
|
|
|
SpriteEffects_t effects;
|
|
|
|
|
float layerDepth;
|
|
|
|
|
|
|
|
|
|
public:
|
2012-03-29 22:02:43 +00:00
|
|
|
|
Texture2D* getTexture() const;
|
|
|
|
|
Rectangle DestinationRectangle() const;
|
|
|
|
|
Rectangle SourceRectangle() const;
|
|
|
|
|
Color getColor() const;
|
|
|
|
|
float Rotation() const;
|
|
|
|
|
Vector2 Origin() const;
|
|
|
|
|
SpriteEffects_t Effects() const;
|
|
|
|
|
float LayerDepth() const;
|
2011-01-16 00:47:37 +00:00
|
|
|
|
|
2011-05-02 17:33:24 +00:00
|
|
|
|
Sprite();
|
2012-03-29 22:02:43 +00:00
|
|
|
|
Sprite(Texture2D* texture, const Rectangle sourceRectangle, const Rectangle destinationRectangle, const Color color, const float rotation, const Vector2 origin, const SpriteEffects_t effects, const float layerDepth);
|
|
|
|
|
Sprite(const Sprite &obj);
|
2011-05-02 17:33:24 +00:00
|
|
|
|
|
2012-09-28 20:36:02 +00:00
|
|
|
|
int GetType() const;
|
|
|
|
|
|
2012-03-29 22:02:43 +00:00
|
|
|
|
bool operator !=(const Sprite& right) const;
|
|
|
|
|
bool operator ==(const Sprite& right) const;
|
2011-01-16 00:47:37 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif //_XFX_GRAPHICS_SPRITE_
|