351 THROW_ERROR(Std_Err_lDivByZero, Std_Err_strDivByZero);
430 THROW_ERROR(Std_Err_lDivByZero, Std_Err_strDivByZero);
492 if(fabs(
m_fltR) < fltTolerance)
494 if(fabs(
m_fltG) < fltTolerance)
496 if(fabs(
m_fltB) < fltTolerance)
498 if(fabs(
m_fltA) < fltTolerance)
525 THROW_PARAM_ERROR(Std_Err_lInvalidIndex, Std_Err_strInvalidIndex,
"Index", iIndex);
552 THROW_TEXT_ERROR(Std_Err_lParamNotFound, Std_Err_strParamNotFound, strParamName);
573 Load(oXml, strParamName, bThrowError);
virtual void Deserialize(std::string &strXml)
Deserializes a string into an xml document.
virtual bool FindChildElement(std::string strElementName, bool fThrowError=true)
Finds a child element by name.
void Set(float R, float G, float B, float A)
Sets the color values.
void Load(CStdXml &oXml, std::string strParamName, bool bThrowError=true)
Loads the color.
void Normalize()
Normalizes the color.
virtual bool FindElement(std::string strElementName, bool fThrowError=true)
Finds an element with the specified name.
double Magnitude()
Gets the magnitude of the color.
float b()
Gets the blue value of the color.
void operator/=(const float fltVal)
/= casting operator.
float g()
Gets the green value of the color.
float m_fltG
The green component of the color.
CStdColor operator+(const CStdColor &oPoint)
casting operator.
CStdColor operator-(const CStdColor &oPoint)
casting operator.
bool Std_InValidRange(int iMinVal, int iMaxVal, int iVal, bool bThrowError, std::string strParamName)
Tests whether a number is within a valid range.
float m_fltR
The red component of the color.
float m_fltMaxRange
some colors are 0-255, others are 0-1. This specifies the max range for these colors ...
void operator+=(const CStdColor &oPoint)
+= casting operator.
bool operator==(const CStdColor &oPoint)
== casting operator.
A standard xml manipulation class.
virtual float GetAttribFloat(std::string strAttribName, bool bThrowError=true, float fltDefault=0)
Gets an attribute float.
float m_fltB
The blue component of the color.
float a()
Gets the alpha value of the color.
Namespace for the standard utility objects.
CStdColor operator*(const float fltVal)
casting operator.
bool operator!=(const CStdColor &oPoint)
!= casting operator.
virtual bool OutOfElem()
Goes out of the element where the cursor is located.
void operator*=(const float fltVal)
*= casting operator.
void ClearNearZero(float fltTolerance=1e-5f)
Clears the near zero described by fltTolerance.
virtual bool IntoChildElement(std::string strElementName, bool bThrowError=true)
Goes into the child element with the specified name.
CStdColor operator/(const float fltVal)
/ casting operator.
float m_fltA
The alpha component of the color.
float operator[](const int iIndex)
[] casting operator.
CStdColor()
Default constructor.
float r()
Gets the red value of the color.
void operator=(const CStdColor &oPoint)
= casting operator.
void operator-=(const CStdColor &oPoint)
-= casting operator.