Spinning Topp Logo BlackTopp Studios
inc
Public Member Functions | Protected Attributes | List of all members
Mezzanine::Graphics::Procedural::RectangleModifier Class Reference

A modifier that draws a simple coloured rectangle onto the texture. More...

#include <rectanglemodifier.h>

+ Inheritance diagram for Mezzanine::Graphics::Procedural::RectangleModifier:
+ Collaboration diagram for Mezzanine::Graphics::Procedural::RectangleModifier:

Public Member Functions

 RectangleModifier ()
 Blank constructor.
 
virtual ~RectangleModifier ()
 Class destructor.
 
virtual String GetName () const
 Gets the name of this modifier. More...
 
virtual void Modify (TextureBuffer &Buffer)
 Alters the generated pixels in a TextureBuffer. More...
 
RectangleModifierSetColour (const ColourValue &Colour)
 Sets the colour of the rectangle to be generated. More...
 
RectangleModifierSetColour (const Real Red, const Real Green, const Real Blue, const Real Alpha=1.0)
 Sets the colour of the rectangle to be generated. More...
 
RectangleModifierSetColour (const UInt8 Red, const UInt8 Green, const UInt8 Blue, const UInt8 Alpha)
 Sets the colour of the rectangle to be generated. More...
 
RectangleModifierSetPosition (const Real XPositionRel, const Real YPositionRel, const Integer XPositionAdj, const Integer YPositionAdj)
 Sets the relative and offset values for the rectangle position. More...
 
RectangleModifierSetRectangle (const Real XPosition, const Real YPosition, const Real XSize, const Real YSize)
 Sets the relative position and size of this rectangle.. More...
 
RectangleModifierSetRectangle (const Integer XPosition, const Integer YPosition, const Integer XSize, const Integer YSize)
 Sets the offsets for the position and size of this rectangle. More...
 
RectangleModifierSetRectangle (const Real XPositionRel, const Real YPositionRel, const Real XSizeRel, const Real YSizeRel, const Integer XPositionAdj, const Integer YPositionAdj, const Integer XSizeAdj, const Integer YSizeAdj)
 Sets the relative and offset values for the rectangle. More...
 
RectangleModifierSetSize (const Real XSizeRel, const Real YSizeRel, const Integer XSizeAdj, const Integer YSizeAdj)
 Sets the relative and offset values for the rectangle size. More...
 
RectangleModifierSetXPositionAdj (const Integer X)
 Sets the absolute component of the left edge. More...
 
RectangleModifierSetXPositionRel (const Real X)
 Sets the relative component of the left edge. More...
 
RectangleModifierSetXSizeAdj (const Integer X)
 Sets the absolute component for the horizontal size. More...
 
RectangleModifierSetXSizeRel (const Real X)
 Sets the relative component of the horizontal size. More...
 
RectangleModifierSetYPositionAdj (const Integer Y)
 Sets the absolute component of the top edge. More...
 
RectangleModifierSetYPositionRel (const Real Y)
 Sets the relative component of the top edge. More...
 
RectangleModifierSetYSizeAdj (const Integer Y)
 Sets the absolute component for the vertical size. More...
 
RectangleModifierSetYSizeRel (const Real Y)
 Sets the relative component of the vertical size. More...
 
- Public Member Functions inherited from Mezzanine::Graphics::Procedural::TextureModifier
 TextureModifier ()
 Blank constructor.
 
virtual ~TextureModifier ()
 Class destructor.
 

Protected Attributes

ColourValue FillColour
 The colour of the rectangle to apply to the texture. More...
 
Integer PositionXAdj
 The left edge adjustment of the rectangle after relative coordinates are calculated. More...
 
Real PositionXRel
 The left edge of the rectangle in relative coordinates. More...
 
Integer PositionYAdj
 The top edge adjustment of the rectangle after relative coordinates are calculated. More...
 
Real PositionYRel
 The top edge of the rectangle in relative coordinates. More...
 
Integer SizeXAdj
 The horizontal size adjustment of the rectangle after relative coordinates are calculated. More...
 
Real SizeXRel
 The horizontal size of the rectangle in relative coordinates. More...
 
Integer SizeYAdj
 The vertical size adjustment of the rectangle after relative coordinates are calculated. More...
 
Real SizeYRel
 The vertical size of the rectangle in relative coordinates. More...
 

Detailed Description

A modifier that draws a simple coloured rectangle onto the texture.

This modifier will use both relative and absolute coordinates to place the the rectangle on the texture, first resolving the relative component and then adding the absolute component.

Definition at line 83 of file rectanglemodifier.h.

Member Function Documentation

String Mezzanine::Graphics::Procedural::RectangleModifier::GetName ( ) const
virtual

Gets the name of this modifier.

Returns
Returns a string containing the name of this modifier.

Implements Mezzanine::Graphics::Procedural::TextureModifier.

Definition at line 116 of file rectanglemodifier.cpp.

void Mezzanine::Graphics::Procedural::RectangleModifier::Modify ( TextureBuffer Buffer)
virtual

Alters the generated pixels in a TextureBuffer.

Parameters
BufferThe buffer to be modified.

Implements Mezzanine::Graphics::Procedural::TextureModifier.

Definition at line 98 of file rectanglemodifier.cpp.

RectangleModifier & Mezzanine::Graphics::Procedural::RectangleModifier::SetColour ( const ColourValue Colour)

Sets the colour of the rectangle to be generated.

Parameters
ColourThe colour of the rectangle to generate. Initial Value: 1.0, 1.0, 1.0, 1.0.
Returns
Returns a reference to this.

Definition at line 122 of file rectanglemodifier.cpp.

RectangleModifier & Mezzanine::Graphics::Procedural::RectangleModifier::SetColour ( const Real  Red,
const Real  Green,
const Real  Blue,
const Real  Alpha = 1.0 
)

Sets the colour of the rectangle to be generated.

Parameters
RedThe Red component for the colour of the rectangle to generate. Initial Value: 1.0.
GreenThe Green component for the colour of the rectangle to generate. Initial Value: 1.0.
BlueThe Blue component for the colour of the rectangle to generate. Initial Value: 1.0.
AlphaThe Alpha component for the colour of the rectangle to generate. Initial Value: 1.0.
Returns
Returns a reference to this.

Definition at line 125 of file rectanglemodifier.cpp.

RectangleModifier & Mezzanine::Graphics::Procedural::RectangleModifier::SetColour ( const UInt8  Red,
const UInt8  Green,
const UInt8  Blue,
const UInt8  Alpha 
)

Sets the colour of the rectangle to be generated.

Parameters
RedThe Red component for the colour of the rectangle to generate. Initial Value: 255.
GreenThe Green component for the colour of the rectangle to generate. Initial Value: 255.
BlueThe Blue component for the colour of the rectangle to generate. Initial Value: 255.
AlphaThe Alpha component for the colour of the rectangle to generate. Initial Value: 255.
Returns
Returns a reference to this.

Definition at line 128 of file rectanglemodifier.cpp.

RectangleModifier & Mezzanine::Graphics::Procedural::RectangleModifier::SetPosition ( const Real  XPositionRel,
const Real  YPositionRel,
const Integer  XPositionAdj,
const Integer  YPositionAdj 
)

Sets the relative and offset values for the rectangle position.

Parameters
XPositionRelThe left edge of the rectangle in relative coordinates. Initial Value: 0.0.
YPositionRelThe top edge of the rectangle in relative coordinates. Initial Value: 0.0.
XPositionAdjThe left edge adjustment of the rectangle after relative coordinates are calculated. Initial Value: 0.
YPositionAdjThe top edge adjustment of the rectangle after relative coordinates are calculated. Initial Value: 0.
Returns
Returns a reference to this.

Definition at line 162 of file rectanglemodifier.cpp.

RectangleModifier & Mezzanine::Graphics::Procedural::RectangleModifier::SetRectangle ( const Real  XPosition,
const Real  YPosition,
const Real  XSize,
const Real  YSize 
)

Sets the relative position and size of this rectangle..

Parameters
XPositionThe left edge of the rectangle in relative coordinates. Initial Value: 0.0.
YPositionThe top edge of the rectangle in relative coordinates. Initial Value: 0.0.
XSizeThe horizontal size of the rectangle in relative coordinates. Initial Value: 1.0.
YSizeThe vertical size of the rectangle in relative coordinates. Initial Value: 1.0.
Returns
Returns a reference to this.

Definition at line 131 of file rectanglemodifier.cpp.

RectangleModifier & Mezzanine::Graphics::Procedural::RectangleModifier::SetRectangle ( const Integer  XPosition,
const Integer  YPosition,
const Integer  XSize,
const Integer  YSize 
)

Sets the offsets for the position and size of this rectangle.

Parameters
XPositionThe left edge adjustment of the rectangle after relative coordinates are calculated. Initial Value: 0.
YPositionThe top edge adjustment of the rectangle after relative coordinates are calculated. Initial Value: 0.
XSizeThe horizontal size adjustment of the rectangle after relative coordinates are calculated. Initial Value: 0.
YSizeThe vertical size adjustment of the rectangle after relative coordinates are calculated. Initial Value: 0.
Returns
Returns a reference to this.

Definition at line 140 of file rectanglemodifier.cpp.

RectangleModifier & Mezzanine::Graphics::Procedural::RectangleModifier::SetRectangle ( const Real  XPositionRel,
const Real  YPositionRel,
const Real  XSizeRel,
const Real  YSizeRel,
const Integer  XPositionAdj,
const Integer  YPositionAdj,
const Integer  XSizeAdj,
const Integer  YSizeAdj 
)

Sets the relative and offset values for the rectangle.

Parameters
XPositionRelThe left edge of the rectangle in relative coordinates. Initial Value: 0.0.
YPositionRelThe top edge of the rectangle in relative coordinates. Initial Value: 0.0.
XSizeRelThe horizontal size of the rectangle in relative coordinates. Initial Value: 1.0.
YSizeRelThe vertical size of the rectangle in relative coordinates. Initial Value: 1.0.
XPositionAdjThe left edge adjustment of the rectangle after relative coordinates are calculated. Initial Value: 0.
YPositionAdjThe top edge adjustment of the rectangle after relative coordinates are calculated. Initial Value: 0.
XSizeAdjThe horizontal size adjustment of the rectangle after relative coordinates are calculated. Initial Value: 0.
YSizeAdjThe vertical size adjustment of the rectangle after relative coordinates are calculated. Initial Value: 0.
Returns
Returns a reference to this.

Definition at line 149 of file rectanglemodifier.cpp.

RectangleModifier & Mezzanine::Graphics::Procedural::RectangleModifier::SetSize ( const Real  XSizeRel,
const Real  YSizeRel,
const Integer  XSizeAdj,
const Integer  YSizeAdj 
)

Sets the relative and offset values for the rectangle size.

Parameters
XSizeRelThe horizontal size of the rectangle in relative coordinates. Initial Value: 1.0.
YSizeRelThe vertical size of the rectangle in relative coordinates. Initial Value: 1.0.
XSizeAdjThe horizontal size adjustment of the rectangle after relative coordinates are calculated. Initial Value: 0.
YSizeAdjThe vertical size adjustment of the rectangle after relative coordinates are calculated. Initial Value: 0.
Returns
Returns a reference to this.

Definition at line 171 of file rectanglemodifier.cpp.

RectangleModifier & Mezzanine::Graphics::Procedural::RectangleModifier::SetXPositionAdj ( const Integer  X)

Sets the absolute component of the left edge.

Parameters
XThe left edge adjustment of the rectangle after relative coordinates are calculated. Initial Value: 0.
Returns
Returns a reference to this.

Definition at line 192 of file rectanglemodifier.cpp.

RectangleModifier & Mezzanine::Graphics::Procedural::RectangleModifier::SetXPositionRel ( const Real  X)

Sets the relative component of the left edge.

Parameters
XThe left edge of the rectangle in relative coordinates. Initial Value: 0.0.
Returns
Returns a reference to this.

Definition at line 180 of file rectanglemodifier.cpp.

RectangleModifier & Mezzanine::Graphics::Procedural::RectangleModifier::SetXSizeAdj ( const Integer  X)

Sets the absolute component for the horizontal size.

Parameters
XThe horizontal size adjustment of the rectangle after relative coordinates are calculated. Initial Value: 0.
Returns
Returns a reference to this.

Definition at line 198 of file rectanglemodifier.cpp.

RectangleModifier & Mezzanine::Graphics::Procedural::RectangleModifier::SetXSizeRel ( const Real  X)

Sets the relative component of the horizontal size.

Parameters
XThe horizontal size of the rectangle in relative coordinates. Initial Value: 1.0.
Returns
Returns a reference to this.

Definition at line 186 of file rectanglemodifier.cpp.

RectangleModifier & Mezzanine::Graphics::Procedural::RectangleModifier::SetYPositionAdj ( const Integer  Y)

Sets the absolute component of the top edge.

Parameters
YThe top edge adjustment of the rectangle after relative coordinates are calculated. Initial Value: 0.
Returns
Returns a reference to this.

Definition at line 195 of file rectanglemodifier.cpp.

RectangleModifier & Mezzanine::Graphics::Procedural::RectangleModifier::SetYPositionRel ( const Real  Y)

Sets the relative component of the top edge.

Parameters
YThe top edge of the rectangle in relative coordinates. Initial Value: 0.0.
Returns
Returns a reference to this.

Definition at line 183 of file rectanglemodifier.cpp.

RectangleModifier & Mezzanine::Graphics::Procedural::RectangleModifier::SetYSizeAdj ( const Integer  Y)

Sets the absolute component for the vertical size.

Parameters
YThe vertical size adjustment of the rectangle after relative coordinates are calculated. Initial Value: 0.
Returns
Returns a reference to this.

Definition at line 201 of file rectanglemodifier.cpp.

RectangleModifier & Mezzanine::Graphics::Procedural::RectangleModifier::SetYSizeRel ( const Real  Y)

Sets the relative component of the vertical size.

Parameters
YThe vertical size of the rectangle in relative coordinates. Initial Value: 1.0.
Returns
Returns a reference to this.

Definition at line 189 of file rectanglemodifier.cpp.

Member Data Documentation

ColourValue Mezzanine::Graphics::Procedural::RectangleModifier::FillColour
protected

The colour of the rectangle to apply to the texture.

Definition at line 88 of file rectanglemodifier.h.

Integer Mezzanine::Graphics::Procedural::RectangleModifier::PositionXAdj
protected

The left edge adjustment of the rectangle after relative coordinates are calculated.

Definition at line 103 of file rectanglemodifier.h.

Real Mezzanine::Graphics::Procedural::RectangleModifier::PositionXRel
protected

The left edge of the rectangle in relative coordinates.

Definition at line 91 of file rectanglemodifier.h.

Integer Mezzanine::Graphics::Procedural::RectangleModifier::PositionYAdj
protected

The top edge adjustment of the rectangle after relative coordinates are calculated.

Definition at line 106 of file rectanglemodifier.h.

Real Mezzanine::Graphics::Procedural::RectangleModifier::PositionYRel
protected

The top edge of the rectangle in relative coordinates.

Definition at line 94 of file rectanglemodifier.h.

Integer Mezzanine::Graphics::Procedural::RectangleModifier::SizeXAdj
protected

The horizontal size adjustment of the rectangle after relative coordinates are calculated.

Definition at line 109 of file rectanglemodifier.h.

Real Mezzanine::Graphics::Procedural::RectangleModifier::SizeXRel
protected

The horizontal size of the rectangle in relative coordinates.

Definition at line 97 of file rectanglemodifier.h.

Integer Mezzanine::Graphics::Procedural::RectangleModifier::SizeYAdj
protected

The vertical size adjustment of the rectangle after relative coordinates are calculated.

Definition at line 112 of file rectanglemodifier.h.

Real Mezzanine::Graphics::Procedural::RectangleModifier::SizeYRel
protected

The vertical size of the rectangle in relative coordinates.

Definition at line 100 of file rectanglemodifier.h.


The documentation for this class was generated from the following files: