public override bool EvalTransparentPaint(IPaletteBack paletteBack,
IPaletteBorder paletteBorder,
PaletteState state)
{
int rounding = paletteBorder.GetBorderRounding(state);
// If the border takes up some visual space
if (paletteBorder.GetBorderWidth(state) > 0)
{
// If the border is not being painted then it must be transparent
if (paletteBorder.GetBorderDraw(state) == InheritBool.False)
return true;
else
{
// If there is rounding causing transparent corners
if (paletteBorder.GetBorderRounding(state) > 0)
return true;
else
{
// If the first color has alpha channel then has transparency
if (paletteBorder.GetBorderColor1(state).A < 255)
return true;
else
{
// Does the draw style require use of the second color?
if (paletteBorder.GetBorderColorStyle(state) != PaletteColorStyle.Solid)
{
// If the second color has alpha channel then has transparency
if (paletteBorder.GetBorderColor2(state).A < 255)
return true;
}
}
}
}
}
// The border does not cause transparency, check the background
return EvalTransparentPaint(paletteBack, state);
}