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_STOP > | m_StopData |
| CYIGradient::CYIGradient | ( | ) |
|
virtual |
| 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.
| 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
|
protected |
|
protected |