67 #ifndef _graphicsproceduralblitmodifier_cpp
68 #define _graphicsproceduralblitmodifier_cpp
70 #include "Graphics/Procedural/Texture/blitmodifier.h"
101 Whole ResX =
static_cast<Whole>(
static_cast<Real>( X - DestRect.
Left ) / static_cast<Real>( DestRect.
GetWidth() ) * static_cast<Real>( SrcRect.
GetWidth() ) + static_cast<Real>( SrcRect.
Left ) );
102 Whole ResY =
static_cast<Whole>(
static_cast<Real>( Y - DestRect.
Top ) / static_cast<Real>( DestRect.
GetHeight() ) * static_cast<Real>( SrcRect.
GetHeight() ) + static_cast<Real>( SrcRect.
Top ) );
110 {
return "BlitModifier"; }
ColourChannelType & GetPixel(const Whole X, const Whole Y, const UInt16 Component)
Gets access to the pixel at the specified position in this buffer. the X or Y location go beyond the ...
virtual String GetName() const
Gets the name of this modifier.
BlitModifier & SetSrcTexture(TextureBuffer *SrcTexture)
Sets the source texture to be copied from.
void SetValues(const NumType RectLeft, const NumType RectTop, const NumType RectRight, const NumType RectBottom)
Sets the value of each member of this Rect.
BlitModifier & SetDestRect(const WholeRect &Rect)
Sets the Rect on the destination texture to copy pixels to.
virtual ~BlitModifier()
Class destructor.
Whole GetWidth() const
Get the pixel width of this texture.
TextureBuffer * BlitSrcTexture
A pointer to the source texture from which to copy pixels.
BlitModifier & SetSrcRect(const WholeRect &Rect)
Sets the Rect on the source texture to copy pixels from.
NumType GetWidth() const
Gets the width of this Rect.
float Real
A Datatype used to represent a real floating point number.
NumType Bottom
The Bottom edge of the rect.
A modifier that will copy a portion of one texture and place it into another.
NumType Right
The Right edge of the rect.
NumType Left
The Left edge of the rect.
WholeRect BlitDestRect
The bounds of the pixels to be copied over in the destination texture.
void ClampToSize(const NumType Width, const NumType Height)
Clamps the position and size of this Rect to the provided size.
A convenience buffer that stores pixel colour values of a texture to be generated.
BlitModifier()
Blank constructor.
The bulk of the engine components go in this namspace.
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
Whole GetHeight() const
Get the pixel height of this texture.
NumType Top
The Top edge of the rect.
void SetPixel(const Whole X, const Whole Y, const ColourValue &Colour)
Set colour of a specified pixel using a ColourValue. the X or Y location go beyond the set size of th...
std::string String
A datatype used to a series of characters.
NumType GetHeight() const
Gets the height of this Rect.
WholeRect BlitSrcRect
The bounds of the pixels to copy from the source texture.
virtual void Modify(TextureBuffer &Buffer)
Alters the generated pixels in a TextureBuffer.