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

A modifier that will copy a portion of one texture and place it into another. More...

#include <blitmodifier.h>

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

Public Member Functions

 BlitModifier ()
 Blank constructor.
 
virtual ~BlitModifier ()
 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...
 
BlitModifierSetDestRect (const WholeRect &Rect)
 Sets the Rect on the destination texture to copy pixels to. More...
 
BlitModifierSetDestRect (const Whole RectLeft, const Whole RectTop, const Whole RectRight, const Whole RectBottom)
 Sets the Rect on the destination texture to copy pixels to. More...
 
BlitModifierSetSrcRect (const WholeRect &Rect)
 Sets the Rect on the source texture to copy pixels from. More...
 
BlitModifierSetSrcRect (const Whole RectLeft, const Whole RectTop, const Whole RectRight, const Whole RectBottom)
 Sets the Rect on the source texture to copy pixels from. More...
 
BlitModifierSetSrcTexture (TextureBuffer *SrcTexture)
 Sets the source texture to be copied from. More...
 
- Public Member Functions inherited from Mezzanine::Graphics::Procedural::TextureModifier
 TextureModifier ()
 Blank constructor.
 
virtual ~TextureModifier ()
 Class destructor.
 

Protected Attributes

WholeRect BlitDestRect
 The bounds of the pixels to be copied over in the destination texture. More...
 
WholeRect BlitSrcRect
 The bounds of the pixels to copy from the source texture. More...
 
TextureBufferBlitSrcTexture
 A pointer to the source texture from which to copy pixels. More...
 

Detailed Description

A modifier that will copy a portion of one texture and place it into another.

Definition at line 84 of file blitmodifier.h.

Member Function Documentation

String Mezzanine::Graphics::Procedural::BlitModifier::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 109 of file blitmodifier.cpp.

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

Alters the generated pixels in a TextureBuffer.

Parameters
BufferThe buffer to be modified.
Todo:
This algorithm is pretty basic pixel fetch and makes no attempt at sampling pixels for the proper colour. This should up updated to do some actual sampling.

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

Definition at line 88 of file blitmodifier.cpp.

BlitModifier & Mezzanine::Graphics::Procedural::BlitModifier::SetDestRect ( const WholeRect Rect)

Sets the Rect on the destination texture to copy pixels to.

Parameters
RectThe Rect describing the bounds for the pixels to copy to on the desination texture. Initial value is a zero Rect.
Returns
Returns a reference to this.

Definition at line 133 of file blitmodifier.cpp.

BlitModifier & Mezzanine::Graphics::Procedural::BlitModifier::SetDestRect ( const Whole  RectLeft,
const Whole  RectTop,
const Whole  RectRight,
const Whole  RectBottom 
)

Sets the Rect on the destination texture to copy pixels to.

Parameters
RectLeftThe Left edge of the destination texture Rect. Initial Value: 0.
RectTopThe Top edge of the destination texture Rect. Initial Value: 0.
RectRightThe Right edge of the destination texture Rect. Initial Value: 0.
RectBottomThe Bottom edge of the destination texture Rect. Initial Value: 0.
Returns
Returns a reference to this.

Definition at line 139 of file blitmodifier.cpp.

BlitModifier & Mezzanine::Graphics::Procedural::BlitModifier::SetSrcRect ( const WholeRect Rect)

Sets the Rect on the source texture to copy pixels from.

Parameters
RectThe Rect describing the bounds for the pixels to copy from the source texture. Initial value is a zero Rect.
Returns
Returns a reference to this.

Definition at line 121 of file blitmodifier.cpp.

BlitModifier & Mezzanine::Graphics::Procedural::BlitModifier::SetSrcRect ( const Whole  RectLeft,
const Whole  RectTop,
const Whole  RectRight,
const Whole  RectBottom 
)

Sets the Rect on the source texture to copy pixels from.

Parameters
RectLeftThe Left edge of the source texture Rect. Initial Value: 0.
RectTopThe Top edge of the source texture Rect. Initial Value: 0.
RectRightThe Right edge of the source texture Rect. Initial Value: 0.
RectBottomThe Bottom edge of the source texture Rect. Initial Value: 0.
Returns
Returns a reference to this.

Definition at line 127 of file blitmodifier.cpp.

BlitModifier & Mezzanine::Graphics::Procedural::BlitModifier::SetSrcTexture ( TextureBuffer SrcTexture)

Sets the source texture to be copied from.

Parameters
SrcTextureA pointer to the source texture from which to copy pixels.
Returns
Returns a reference to this.

Definition at line 115 of file blitmodifier.cpp.

Member Data Documentation

WholeRect Mezzanine::Graphics::Procedural::BlitModifier::BlitDestRect
protected

The bounds of the pixels to be copied over in the destination texture.

Definition at line 95 of file blitmodifier.h.

WholeRect Mezzanine::Graphics::Procedural::BlitModifier::BlitSrcRect
protected

The bounds of the pixels to copy from the source texture.

Definition at line 92 of file blitmodifier.h.

TextureBuffer* Mezzanine::Graphics::Procedural::BlitModifier::BlitSrcTexture
protected

A pointer to the source texture from which to copy pixels.

Definition at line 89 of file blitmodifier.h.


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