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

Fills full image with given colour gradients. More...

#include <gradientgenerator.h>

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

Public Member Functions

 GradientGenerator ()
 Class constructor.
 
virtual ~GradientGenerator ()
 Class destructor.
 
virtual void AddToTextureBuffer (TextureBuffer &Buffer) const
 Replaces and populates the pixels as configured in this generator to a TextureBuffer. More...
 
virtual String GetName () const
 Gets the name of this generator. More...
 
GradientGeneratorSetBottomLeftColour (const ColourValue &Colour)
 Sets the colour of the bottom-left corner. More...
 
GradientGeneratorSetBottomLeftColour (const Real Red, const Real Green, const Real Blue, const Real Alpha=1.0)
 Sets the colour of the bottom-left corner. More...
 
GradientGeneratorSetBottomRightColour (const ColourValue &Colour)
 Sets the colour of the bottom-right corner. More...
 
GradientGeneratorSetBottomRightColour (const Real Red, const Real Green, const Real Blue, const Real Alpha=1.0)
 Sets the colour of the bottom-right corner. More...
 
GradientGeneratorSetColours (const ColourValue &TopLeft, const ColourValue &TopRight, const ColourValue &BottomLeft, const ColourValue &BottomRight)
 Sets the colours of the image corners. More...
 
GradientGeneratorSetTopLeftColour (const ColourValue &Colour)
 Sets the colour of the top-left corner. More...
 
GradientGeneratorSetTopLeftColour (const Real Red, const Real Green, const Real Blue, const Real Alpha=1.0)
 Sets the colour of the top-left corner. More...
 
GradientGeneratorSetTopRightColour (const ColourValue &Colour)
 Sets the colour of the top-right corner. More...
 
GradientGeneratorSetTopRightColour (const Real Red, const Real Green, const Real Blue, const Real Alpha=1.0)
 Sets the colour of the top-right corner. More...
 
- Public Member Functions inherited from Mezzanine::Graphics::Procedural::TextureGenerator
 TextureGenerator ()
 Blank constructor.
 
virtual ~TextureGenerator ()
 Class destructor.
 
TextureBuffer BuildTextureBuffer (const Whole SquareSize) const
 Creates a TextureBuffer with the pixels as configured in this generator. More...
 
TextureBuffer BuildTextureBuffer (const Whole TexWidth, const Whole TexHeight) const
 Creates a TextureBuffer with the pixels as configured in this generator. More...
 
ImageGenerateImage (const Whole SquareSize, const Graphics::PixelFormat Format=Graphics::PF_R8G8B8A8) const
 Generates the Image. More...
 
ImageGenerateImage (const Whole TexWidth, const Whole TexHeight, const Graphics::PixelFormat Format=Graphics::PF_R8G8B8A8) const
 Generates the Image. More...
 
TextureGenerateTexture (const Whole SquareSize, const String &TexName, const String &TexGroup, const Graphics::PixelFormat Format=Graphics::PF_R8G8B8A8) const
 Generates the Texture. More...
 
TextureGenerateTexture (const Whole TexWidth, const Whole TexHeight, const String &TexName, const String &TexGroup, const Graphics::PixelFormat Format=Graphics::PF_R8G8B8A8) const
 Generates the Texture. More...
 

Protected Attributes

ColourValue GenBottomLeftColour
 The colour of the bottom-left corner. More...
 
ColourValue GenBottomRightColour
 The colour of the bottom-right corner. More...
 
ColourValue GenTopLeftColour
 The colour of the top-left corner. More...
 
ColourValue GenTopRightColour
 The colour of the top-right corner. More...
 

Detailed Description

Fills full image with given colour gradients.

Each corner of the image has unique colour.

Definition at line 82 of file gradientgenerator.h.

Member Function Documentation

void Mezzanine::Graphics::Procedural::GradientGenerator::AddToTextureBuffer ( TextureBuffer Buffer) const
virtual

Replaces and populates the pixels as configured in this generator to a TextureBuffer.

Parameters
BufferThe buffer to place this generators pixels in.

Implements Mezzanine::Graphics::Procedural::TextureGenerator.

Definition at line 91 of file gradientgenerator.cpp.

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

Gets the name of this generator.

Returns
Returns a String containing the name of this generator.

Implements Mezzanine::Graphics::Procedural::TextureGenerator.

Definition at line 111 of file gradientgenerator.cpp.

GradientGenerator & Mezzanine::Graphics::Procedural::GradientGenerator::SetBottomLeftColour ( const ColourValue Colour)

Sets the colour of the bottom-left corner.

Parameters
ColourThe colour to be applied to the bottom-left corner of the generated image.
Returns
Returns a reference to this.

Definition at line 141 of file gradientgenerator.cpp.

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

Sets the colour of the bottom-left corner.

Parameters
RedThe Red component for the bottom-left corner colour. Range: [0.0, 1.0].
GreenThe Green component for the bottom-left corner colour. Range: [0.0, 1.0].
BlueThe Blue component for the bottom-left corner colour. Range: [0.0, 1.0].
AlphaThe Alpha component for the bottom-left corner colour. Range: [0.0, 1.0].
Returns
Returns a reference to this.

Definition at line 147 of file gradientgenerator.cpp.

GradientGenerator & Mezzanine::Graphics::Procedural::GradientGenerator::SetBottomRightColour ( const ColourValue Colour)

Sets the colour of the bottom-right corner.

Parameters
ColourThe colour to be applied to the bottom-right corner of the generated image.
Returns
Returns a reference to this.

Definition at line 153 of file gradientgenerator.cpp.

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

Sets the colour of the bottom-right corner.

Parameters
RedThe Red component for the bottom-right corner colour. Range: [0.0, 1.0].
GreenThe Green component for the bottom-right corner colour. Range: [0.0, 1.0].
BlueThe Blue component for the bottom-right corner colour. Range: [0.0, 1.0].
AlphaThe Alpha component for the bottom-right corner colour. Range: [0.0, 1.0].
Returns
Returns a reference to this.

Definition at line 159 of file gradientgenerator.cpp.

GradientGenerator & Mezzanine::Graphics::Procedural::GradientGenerator::SetColours ( const ColourValue TopLeft,
const ColourValue TopRight,
const ColourValue BottomLeft,
const ColourValue BottomRight 
)

Sets the colours of the image corners.

Parameters
TopLeftThe colour to be applied to the top-left corner of the generated image.
TopRightThe colour to be applied to the top-right corner of the generated image.
BottomLeftThe colour to be applied to the bottom-left corner of the generated image.
BottomRightThe colour to be applied to the bottom-right corner of the generated image.
Returns
Returns a reference to this.

Definition at line 165 of file gradientgenerator.cpp.

GradientGenerator & Mezzanine::Graphics::Procedural::GradientGenerator::SetTopLeftColour ( const ColourValue Colour)

Sets the colour of the top-left corner.

Parameters
ColourThe colour to be applied to the top-left corner of the generated image.
Returns
Returns a reference to this.

Definition at line 117 of file gradientgenerator.cpp.

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

Sets the colour of the top-left corner.

Parameters
RedThe Red component for the top-left corner colour. Range: [0.0, 1.0].
GreenThe Green component for the top-left corner colour. Range: [0.0, 1.0].
BlueThe Blue component for the top-left corner colour. Range: [0.0, 1.0].
AlphaThe Alpha component for the top-left corner colour. Range: [0.0, 1.0].
Returns
Returns a reference to this.

Definition at line 123 of file gradientgenerator.cpp.

GradientGenerator & Mezzanine::Graphics::Procedural::GradientGenerator::SetTopRightColour ( const ColourValue Colour)

Sets the colour of the top-right corner.

Parameters
ColourThe colour to be applied to the top-right corner of the generated image.
Returns
Returns a reference to this.

Definition at line 129 of file gradientgenerator.cpp.

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

Sets the colour of the top-right corner.

Parameters
RedThe Red component for the top-right corner colour. Range: [0.0, 1.0].
GreenThe Green component for the top-right corner colour. Range: [0.0, 1.0].
BlueThe Blue component for the top-right corner colour. Range: [0.0, 1.0].
AlphaThe Alpha component for the top-right corner colour. Range: [0.0, 1.0].
Returns
Returns a reference to this.

Definition at line 135 of file gradientgenerator.cpp.

Member Data Documentation

ColourValue Mezzanine::Graphics::Procedural::GradientGenerator::GenBottomLeftColour
protected

The colour of the bottom-left corner.

Definition at line 93 of file gradientgenerator.h.

ColourValue Mezzanine::Graphics::Procedural::GradientGenerator::GenBottomRightColour
protected

The colour of the bottom-right corner.

Definition at line 96 of file gradientgenerator.h.

ColourValue Mezzanine::Graphics::Procedural::GradientGenerator::GenTopLeftColour
protected

The colour of the top-left corner.

Definition at line 87 of file gradientgenerator.h.

ColourValue Mezzanine::Graphics::Procedural::GradientGenerator::GenTopRightColour
protected

The colour of the top-right corner.

Definition at line 90 of file gradientgenerator.h.


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