You.i Engine
CYIGradient Class Reference

Detailed Description

Contains information on how a gradient will be drawn.

#include <graphics/YiGradient.h>

Classes

struct  YI_GRADIENT_STOP
 

Public Member Functions

 CYIGradient ()
 
virtual ~CYIGradient ()
 
void SetDirectionVector (glm::vec2 directionVector)
 
void AddStop (float fOffset, uint32_t nColor)
 
void ClearStops ()
 
uint32_t GetStopDataSize ()
 
bool GetStopDataAt (uint32_t nIndex, YI_GRADIENT_STOP *pDataOut)
 
glm::vec2 GetDirectionVector ()
 

Protected Attributes

glm::vec2 m_directionVector
 
std::vector< YI_GRADIENT_STOPm_StopData
 

Constructor & Destructor Documentation

CYIGradient::CYIGradient ( )
virtual CYIGradient::~CYIGradient ( )
virtual

Member Function Documentation

void CYIGradient::AddStop ( float  fOffset,
uint32_t  nColor 
)

Adds a YI_GRADIENT_STOP which is used to determine the location and color of a transition point in the gradient.

See also
YI_GRADIENT_STOP.
void CYIGradient::ClearStops ( )

/details Removes all the YI_GRADIENT_STOPs that were added to this gradient.

glm::vec2 CYIGradient::GetDirectionVector ( )

Returns the direction the gradient will be drawn.

bool CYIGradient::GetStopDataAt ( uint32_t  nIndex,
YI_GRADIENT_STOP pDataOut 
)

Stores the stop data located at the index nIndex in pDataOut.

uint32_t CYIGradient::GetStopDataSize ( )

Returns the number of YI_GRADIENT_STOPs found in the gradient.

void CYIGradient::SetDirectionVector ( glm::vec2  directionVector)

Sets the direction the gradient will be drawn. Supports drawing horizontal, diagonal or vertical gradients

Member Data Documentation

glm::vec2 CYIGradient::m_directionVector
protected
std::vector<YI_GRADIENT_STOP> CYIGradient::m_StopData
protected

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