static int EvaluateFontAndTextColor(Canvas canvas, TextSpanStyle spanStyle)
{
var font = spanStyle.FontInfo;
var color = spanStyle.FontColor;
var currentTextFont = canvas.CurrentFont;
var currentTextColor = canvas.CurrentTextColor;
if (font != null && font != currentTextFont)
{
if (currentTextColor != color)
{
return DIFF_FONT_DIFF_TEXT_COLOR;
}
else
{
return DIFF_FONT_SAME_TEXT_COLOR;
}
}
else
{
if (currentTextColor != color)
{
return SAME_FONT_DIFF_TEXT_COLOR;
}
else
{
return SAME_FONT_SAME_TEXT_COLOR;
}
}
}
protected bool HasStyle