- Main Page
- Classes
- Files

- File List

# C:/Documents and Settings/Administrator/Desktop/woopsi-src-0.40/Woopsi/libwoopsi/include/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
    00036                 virtual void draw(Rect clipRect);
    00037
    00043                 virtual bool resize(u16 width, u16 height);
    00044
    00045         protected:
    00046                 u16 _fromColour;
    00047                 u16 _toColour;
    00048                 s16 _numberR;
    00049                 s16 _numberG;
    00050                 s16 _numberB;
    00051                 s16 _deltaR;
    00052                 s16 _deltaG;
    00053                 s16 _deltaB;
    00054                 s16* _rowColour;
    00059                 virtual void calculate();
    00060
    00064                 virtual void cacheRowColours();
    00065
    00069                 virtual inline ~Gradient() { };
    00070
    00074                 inline Gradient(const Gradient& gradient) : Gadget(gradient) { };
    00075         };
    00076 }
    00077
    00078 #endif