Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CEGUI::ColourRect Class Reference

Class that holds details of colours for the four corners of a rectangle. More...

#include <CEGUIColourRect.h>

Collaboration diagram for CEGUI::ColourRect:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ColourRect (void)
 Default constructor.
 ColourRect (const colour &col)
 Constructor for ColourRect objects (via single colour). Also handles default construction.
 ColourRect (const colour &top_left, const colour &top_right, const colour &bottom_left, const colour &bottom_right)
 Constructor for ColourRect objects.
void setAlpha (float alpha)
 Set the alpha value to use for all four corners of the ColourRect.
void setTopAlpha (float alpha)
 Set the alpha value to use for the top edge of the ColourRect.
void setBottomAlpha (float alpha)
 Set the alpha value to use for the bottom edge of the ColourRect.
void setLeftAlpha (float alpha)
 Set the alpha value to use for the left edge of the ColourRect.
void setRightAlpha (float alpha)
 Set the alpha value to use for the right edge of the ColourRect.
bool isMonochromatic () const
 Determinate the ColourRect is monochromatic or variegated.
ColourRect getSubRectangle (float left, float right, float top, float bottom) const
 Gets a portion of this ColourRect as a subset ColourRect.
colour getColourAtPoint (float x, float y) const
 Get the colour at a point in the rectangle.
void setColours (const colour &col)
 Set the colour of all four corners simultaneously.
void modulateAlpha (float alpha)
 Module the alpha components of each corner's colour by a constant.
ColourRectoperator *= (const ColourRect &other)
 Modulate all components of this colour rect with corresponding components from another colour rect.

Public Attributes

colour d_top_left
colour d_top_right
colour d_bottom_left
colour d_bottom_right

Detailed Description

Class that holds details of colours for the four corners of a rectangle.

Definition at line 40 of file CEGUIColourRect.h.


Constructor & Destructor Documentation

CEGUI::ColourRect::ColourRect void   ) 
 

Default constructor.

Definition at line 59 of file CEGUIColourRect.cpp.

Referenced by getSubRectangle().

CEGUI::ColourRect::ColourRect const colour col  ) 
 

Constructor for ColourRect objects (via single colour). Also handles default construction.

Definition at line 47 of file CEGUIColourRect.cpp.

CEGUI::ColourRect::ColourRect const colour top_left,
const colour top_right,
const colour bottom_left,
const colour bottom_right
 

Constructor for ColourRect objects.

Definition at line 35 of file CEGUIColourRect.cpp.


Member Function Documentation

colour CEGUI::ColourRect::getColourAtPoint float  x,
float  y
const
 

Get the colour at a point in the rectangle.

Parameters:
x The x coordinate of the point
y The y coordinate of the point
Returns:
The colour at the specified point.

Definition at line 132 of file CEGUIColourRect.cpp.

References d_bottom_left, d_bottom_right, d_top_left, and d_top_right.

Referenced by getSubRectangle().

ColourRect CEGUI::ColourRect::getSubRectangle float  left,
float  right,
float  top,
float  bottom
const
 

Gets a portion of this ColourRect as a subset ColourRect.

Parameters:
left The left side of this subrectangle (in the range of 0-1 float)
right The right side of this subrectangle (in the range of 0-1 float)
top The top side of this subrectangle (in the range of 0-1 float)
bottom The bottom side of this subrectangle (in the range of 0-1 float)
Returns:
A ColourRect from the specified range

Definition at line 142 of file CEGUIColourRect.cpp.

References ColourRect(), and getColourAtPoint().

Referenced by CEGUI::RenderableImage::draw_impl(), CEGUI::RenderableFrame::draw_impl(), and CEGUI::FrameComponent::render_impl().

bool CEGUI::ColourRect::isMonochromatic  )  const
 

Determinate the ColourRect is monochromatic or variegated.

Returns:
True if all four corners of the ColourRect has same colour, false otherwise.

Definition at line 122 of file CEGUIColourRect.cpp.

References d_bottom_left, d_bottom_right, d_top_left, and d_top_right.

Referenced by CEGUI::RenderableImage::draw_impl(), CEGUI::RenderableFrame::draw_impl(), CEGUI::ImagerySection::render(), CEGUI::FrameComponent::render_impl(), CEGUI::FalagardComponentBase::writeColoursXML(), CEGUI::SectionSpecification::writeXMLToStream(), and CEGUI::ImagerySection::writeXMLToStream().

void CEGUI::ColourRect::modulateAlpha float  alpha  ) 
 

Module the alpha components of each corner's colour by a constant.

Parameters:
alpha The constant factor to modulate all alpha colour components by.

Definition at line 165 of file CEGUIColourRect.cpp.

References d_bottom_left, d_bottom_right, d_top_left, d_top_right, CEGUI::colour::getAlpha(), and CEGUI::colour::setAlpha().

Referenced by CEGUI::TextItem::populateRenderCache(), CEGUI::StaticText::populateRenderCache(), CEGUI::Static::populateRenderCache(), and CEGUI::SectionSpecification::render().

ColourRect & CEGUI::ColourRect::operator *= const ColourRect other  ) 
 

Modulate all components of this colour rect with corresponding components from another colour rect.

Definition at line 177 of file CEGUIColourRect.cpp.

References d_bottom_left, d_bottom_right, d_top_left, and d_top_right.

void CEGUI::ColourRect::setAlpha float  alpha  ) 
 

Set the alpha value to use for all four corners of the ColourRect.

Parameters:
alpha Alpha value to use.
Returns:
Nothing.

Definition at line 71 of file CEGUIColourRect.cpp.

References d_bottom_left, d_bottom_right, d_top_left, d_top_right, and CEGUI::colour::setAlpha().

void CEGUI::ColourRect::setBottomAlpha float  alpha  ) 
 

Set the alpha value to use for the bottom edge of the ColourRect.

Parameters:
alpha Alpha value to use.
Returns:
Nothing.

Definition at line 93 of file CEGUIColourRect.cpp.

References d_bottom_left, d_bottom_right, and CEGUI::colour::setAlpha().

void CEGUI::ColourRect::setColours const colour col  ) 
 

Set the colour of all four corners simultaneously.

Parameters:
col colour that is to be set for all four corners of the ColourRect;

Definition at line 156 of file CEGUIColourRect.cpp.

References d_bottom_left, d_bottom_right, d_top_left, and d_top_right.

Referenced by CEGUI::MultiLineEditbox::cacheTextLines().

void CEGUI::ColourRect::setLeftAlpha float  alpha  ) 
 

Set the alpha value to use for the left edge of the ColourRect.

Parameters:
alpha Alpha value to use.
Returns:
Nothing.

Definition at line 103 of file CEGUIColourRect.cpp.

References d_bottom_left, d_top_left, and CEGUI::colour::setAlpha().

void CEGUI::ColourRect::setRightAlpha float  alpha  ) 
 

Set the alpha value to use for the right edge of the ColourRect.

Parameters:
alpha Alpha value to use.
Returns:
Nothing.

Definition at line 113 of file CEGUIColourRect.cpp.

References d_bottom_right, d_top_right, and CEGUI::colour::setAlpha().

void CEGUI::ColourRect::setTopAlpha float  alpha  ) 
 

Set the alpha value to use for the top edge of the ColourRect.

Parameters:
alpha Alpha value to use.
Returns:
Nothing.

Definition at line 83 of file CEGUIColourRect.cpp.

References d_top_left, d_top_right, and CEGUI::colour::setAlpha().


Member Data Documentation

colour CEGUI::ColourRect::d_bottom_left
 

Definition at line 198 of file CEGUIColourRect.h.

Referenced by CEGUI::DirectX81Renderer::addQuad(), CEGUI::OpenGLRenderer::addQuad(), CEGUI::DirectX9Renderer::addQuad(), CEGUI::PropertyHelper::colourRectToString(), getColourAtPoint(), CEGUI::ListboxItem::getModulateAlphaColourRect(), CEGUI::SectionSpecification::initColourRectForOverride(), CEGUI::FalagardComponentBase::initColoursRect(), CEGUI::ImagerySection::initMasterColourRect(), isMonochromatic(), modulateAlpha(), operator *=(), setAlpha(), CEGUI::Static::setBackgroundColours(), setBottomAlpha(), CEGUI::RenderableElement::setColours(), setColours(), CEGUI::Static::setFrameColours(), CEGUI::StaticImage::setImageColours(), setLeftAlpha(), CEGUI::ListboxItem::setSelectionColours(), CEGUI::StaticText::setTextColours(), CEGUI::ListboxTextItem::setTextColours(), CEGUI::Static::updateRenderableFrameColours(), CEGUI::StaticImage::updateRenderableImageColours(), CEGUI::FalagardComponentBase::writeColoursXML(), CEGUI::SectionSpecification::writeXMLToStream(), and CEGUI::ImagerySection::writeXMLToStream().

colour CEGUI::ColourRect::d_bottom_right
 

Definition at line 198 of file CEGUIColourRect.h.

Referenced by CEGUI::DirectX81Renderer::addQuad(), CEGUI::OpenGLRenderer::addQuad(), CEGUI::DirectX9Renderer::addQuad(), CEGUI::PropertyHelper::colourRectToString(), getColourAtPoint(), CEGUI::ListboxItem::getModulateAlphaColourRect(), CEGUI::SectionSpecification::initColourRectForOverride(), CEGUI::FalagardComponentBase::initColoursRect(), CEGUI::ImagerySection::initMasterColourRect(), isMonochromatic(), modulateAlpha(), operator *=(), setAlpha(), CEGUI::Static::setBackgroundColours(), setBottomAlpha(), CEGUI::RenderableElement::setColours(), setColours(), CEGUI::Static::setFrameColours(), CEGUI::StaticImage::setImageColours(), setRightAlpha(), CEGUI::ListboxItem::setSelectionColours(), CEGUI::StaticText::setTextColours(), CEGUI::ListboxTextItem::setTextColours(), CEGUI::Static::updateRenderableFrameColours(), CEGUI::StaticImage::updateRenderableImageColours(), CEGUI::FalagardComponentBase::writeColoursXML(), CEGUI::SectionSpecification::writeXMLToStream(), and CEGUI::ImagerySection::writeXMLToStream().

colour CEGUI::ColourRect::d_top_left
 

Definition at line 198 of file CEGUIColourRect.h.

Referenced by CEGUI::DirectX81Renderer::addQuad(), CEGUI::OpenGLRenderer::addQuad(), CEGUI::DirectX9Renderer::addQuad(), CEGUI::PropertyHelper::colourRectToString(), getColourAtPoint(), CEGUI::ListboxItem::getModulateAlphaColourRect(), CEGUI::SectionSpecification::initColourRectForOverride(), CEGUI::FalagardComponentBase::initColoursRect(), CEGUI::ImagerySection::initMasterColourRect(), isMonochromatic(), modulateAlpha(), operator *=(), CEGUI::ImagerySection::render(), setAlpha(), CEGUI::Static::setBackgroundColours(), CEGUI::RenderableElement::setColours(), setColours(), CEGUI::Static::setFrameColours(), CEGUI::StaticImage::setImageColours(), setLeftAlpha(), CEGUI::ListboxItem::setSelectionColours(), CEGUI::StaticText::setTextColours(), CEGUI::ListboxTextItem::setTextColours(), setTopAlpha(), CEGUI::Static::updateRenderableFrameColours(), CEGUI::StaticImage::updateRenderableImageColours(), CEGUI::FalagardComponentBase::writeColoursXML(), CEGUI::SectionSpecification::writeXMLToStream(), and CEGUI::ImagerySection::writeXMLToStream().

colour CEGUI::ColourRect::d_top_right
 

Definition at line 198 of file CEGUIColourRect.h.

Referenced by CEGUI::DirectX81Renderer::addQuad(), CEGUI::OpenGLRenderer::addQuad(), CEGUI::DirectX9Renderer::addQuad(), CEGUI::PropertyHelper::colourRectToString(), getColourAtPoint(), CEGUI::ListboxItem::getModulateAlphaColourRect(), CEGUI::SectionSpecification::initColourRectForOverride(), CEGUI::FalagardComponentBase::initColoursRect(), CEGUI::ImagerySection::initMasterColourRect(), isMonochromatic(), modulateAlpha(), operator *=(), setAlpha(), CEGUI::Static::setBackgroundColours(), CEGUI::RenderableElement::setColours(), setColours(), CEGUI::Static::setFrameColours(), CEGUI::StaticImage::setImageColours(), setRightAlpha(), CEGUI::ListboxItem::setSelectionColours(), CEGUI::StaticText::setTextColours(), CEGUI::ListboxTextItem::setTextColours(), setTopAlpha(), CEGUI::Static::updateRenderableFrameColours(), CEGUI::StaticImage::updateRenderableImageColours(), CEGUI::FalagardComponentBase::writeColoursXML(), CEGUI::SectionSpecification::writeXMLToStream(), and CEGUI::ImagerySection::writeXMLToStream().


The documentation for this class was generated from the following files:
Generated on Wed Sep 7 10:05:40 2005 for Crazy Eddies GUI System by  doxygen 1.4.3