/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2008.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: src/sgx/graphics/gfx_colors.cpp

*/

#include "sgx/core/core.hpp"
#include "sgx/graphics/graphics.hpp"

#include "domains/graphics/color/colortypes.hpp"

#include "utils/imagelib/imagelib.hpp"

void 
CSGXGraphicsEngine::setColor(const sgxColorRGBA &col)
{
	m_PrimitiveColor.setState(col);
}

void 
CSGXGraphicsEngine::getColor(sgxColorRGBA &col) const
{
	col = m_PrimitiveColor.getState();
}

void 
CSGXGraphicsEngine::setColor(const sgxColorRGB &col)
{
	m_PrimitiveColor.setState(sgxColorRGBA(col.r, col.g, col.b, 1.0f));
}

void 
CSGXGraphicsEngine::getColor(sgxColorRGB &col) const
{
	sgxColorRGBA cola(m_PrimitiveColor.getState());
	col = sgxColorRGB(cola.r, cola.g, cola.b);
}
