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