00001 #ifndef LIBWIISPRITE_QUAD 00002 #define LIBWIISPRITE_QUAD 00003 00004 #include <stdlib.h> 00005 #include <gccore.h> 00006 00007 #include "layer.h" 00008 #include "sprite.h" 00009 00011 namespace wsp{ 00013 class Quad : public Layer { 00014 public: 00016 Quad(); 00018 virtual ~Quad(); 00019 00022 void SetRectangle(Rectangle* rect); 00026 const Rectangle* GetRectangle(); 00027 00030 void SetWidth(u32 width); 00033 void SetHeight(u32 height); 00034 00037 void SetRotation(f32 rotation); 00040 f32 GetRotation() const; 00041 00044 void SetBorderWidth(u16 width); 00047 u16 GetBorderWidth() const; 00048 00051 void SetBorder(bool border); 00054 bool IsBorder() const; 00055 00058 void SetFillColor(GXColor fillColor); 00061 void SetBorderColor(GXColor borderColor); 00062 00064 void Draw(f32 offsetX = 0, f32 offsetY = 0) const; 00065 protected: 00066 private: 00067 Rectangle* _rect; 00068 f32 _rotation; 00069 bool _border; 00070 u16 _borderWidth; 00071 GXColor _fillC, _borderC; 00072 }; 00073 }; 00074 00075 #endif