- Main Page
- Classes
- Files

- File List

# gradient.h

    00001 /* Contributed by Jeff Laing
    00002  * 20071207
    00003  * - Updated by Ant to follow Woopsi code style
    00004  */
    00005
    00006 #ifndef _GRADIENT_H_
    00007 #define _GRADIENT_H_
    00008
    00009 #include <cstdlib>
    00010 #include "gadget.h"
    00011
    00012 namespace WoopsiUI {
    00013
    00017         class Gradient : public Gadget {
    00018         public:
    00019
    00029                 Gradient(s16 x, s16 y, u16 width, u16 height, u16 fromColour, u16 toColour);
    00030
    00031         protected:
    00032                 u16 _fromColour;
    00033                 u16 _toColour;
    00034                 s16 _numberR;
    00035                 s16 _numberG;
    00036                 s16 _numberB;
    00037                 s16 _deltaR;
    00038                 s16 _deltaG;
    00039                 s16 _deltaB;
    00040                 s16* _rowColour;
    00048                 virtual void drawContents(GraphicsPort* port);
    00049
    00055                 virtual void onResize(u16 width, u16 height);
    00056
    00060                 virtual void calculate();
    00061
    00065                 virtual void cacheRowColours();
    00066
    00070                 virtual inline ~Gradient() { };
    00071
    00075                 inline Gradient(const Gradient& gradient) : Gadget(gradient) { };
    00076         };
    00077 }
    00078
    00079 #endif