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 offset, uint32_t color)
 
void ClearStops ()
 
size_t GetStopDataSize ()
 
bool GetStopDataAt (size_t index, YI_GRADIENT_STOP *pDataOut)
 
glm::vec2 GetDirectionVector ()
 

Protected Attributes

glm::vec2 m_directionVector
 
std::vector< YI_GRADIENT_STOPm_StopData
 

Constructor & Destructor Documentation

◆ CYIGradient()

CYIGradient::CYIGradient ( )

◆ ~CYIGradient()

virtual CYIGradient::~CYIGradient ( )
virtual

Member Function Documentation

◆ AddStop()

void CYIGradient::AddStop ( float  offset,
uint32_t  color 
)

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

See also
CYIGradient::YI_GRADIENT_STOP.

◆ ClearStops()

void CYIGradient::ClearStops ( )

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

◆ GetDirectionVector()

glm::vec2 CYIGradient::GetDirectionVector ( )

Returns the direction the gradient will be drawn.

◆ GetStopDataAt()

bool CYIGradient::GetStopDataAt ( size_t  index,
YI_GRADIENT_STOP pDataOut 
)

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

◆ GetStopDataSize()

size_t CYIGradient::GetStopDataSize ( )

Returns the number of YI_GRADIENT_STOPs found in the gradient.

◆ SetDirectionVector()

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

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

Member Data Documentation

◆ m_directionVector

glm::vec2 CYIGradient::m_directionVector
protected

◆ m_StopData

std::vector<YI_GRADIENT_STOP> CYIGradient::m_StopData
protected

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