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();
}
Published date: 05/24/2022
Last modified date: 02/24/2022