Updating the Palettes

To make sure that both palettes are updated when modifications are applied to the original one, we need to overload the following member functions.

void

ShadowEllipse::setBackground(IlvColor* color)

{

IlvSimpleGraphic::setBackground(color);

computeInvertedPalette();

}

 

// --------------------------------------------------------------------------

void

ShadowEllipse::setForeground(IlvColor* color)

{

IlvSimpleGraphic::setForeground(color);

computeInvertedPalette();

}

 

// --------------------------------------------------------------------------

void

ShadowEllipse::setMode(IlvDrawMode mode)

{

getPalette()->setMode(mode);

_invertedPalette->setMode(mode);

}

 

// --------------------------------------------------------------------------

void

ShadowEllipse::setPalette(IlvPalette* palette)

{

IlvSimpleGraphic::setPalette(palette);

computeInvertedPalette();

}