Crazy Eddies GUI System: CEGUIColourRect.h Source File

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

# CEGUIColourRect.h

    00001 /************************************************************************
    00002         filename:       CEGUIColourRect.h
    00003         created:        8/3/2004
    00004         author:         Paul D Turner
    00005
    00006         purpose:        Defines class representing colours for four corners of a
    00007                                 rectangle
    00008 *************************************************************************/
    00009 /*************************************************************************
    00010     Crazy Eddie's GUI System (http://www.cegui.org.uk)
    00011     Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
    00012
    00013     This library is free software; you can redistribute it and/or
    00014     modify it under the terms of the GNU Lesser General Public
    00015     License as published by the Free Software Foundation; either
    00016     version 2.1 of the License, or (at your option) any later version.
    00017
    00018     This library is distributed in the hope that it will be useful,
    00019     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00020     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00021     Lesser General Public License for more details.
    00022
    00023     You should have received a copy of the GNU Lesser General Public
    00024     License along with this library; if not, write to the Free Software
    00025     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    00026 *************************************************************************/
    00027 #ifndef _CEGUIColourRect_h_
    00028 #define _CEGUIColourRect_h_
    00029
    00030 #include "CEGUIBase.h"
    00031 #include "CEGUIcolour.h"
    00032
    00033 // Start of CEGUI namespace section
    00034 namespace CEGUI
    00035 {
    00040 class CEGUIEXPORT ColourRect
    00041 {
    00042 public:
    00047         ColourRect(void);
    00048
    00049
    00054         ColourRect(const colour& col);
    00055
    00056
    00061         ColourRect(const colour& top_left, const colour& top_right, const colour& bottom_left, const colour& bottom_right);
    00062
    00063
    00074         void    setAlpha(float alpha);
    00075
    00076
    00087         void    setTopAlpha(float alpha);
    00088
    00089
    00100         void    setBottomAlpha(float alpha);
    00101
    00102
    00113         void    setLeftAlpha(float alpha);
    00114
    00115
    00126         void    setRightAlpha(float alpha);
    00127
    00128
    00136         bool    isMonochromatic() const;
    00137
    00138
    00155         ColourRect getSubRectangle( float left, float right, float top, float bottom ) const;
    00156
    00169         colour getColourAtPoint( float x, float y ) const;
    00170
    00171
    00179         void    setColours(const colour& col);
    00180
    00181
    00189         void    modulateAlpha(float alpha);
    00190
    00195     ColourRect& operator*=(const ColourRect& other);
    00196
    00197
    00198         colour  d_top_left, d_top_right, d_bottom_left, d_bottom_right;         //<! ColourRect component colours
    00199 };
    00200
    00201 } // End of  CEGUI namespace section
    00202
    00203
    00204 #endif  // end of guard _CEGUIColourRect_h_