protected Div ( |
||
right | ||
return |
protected override StyleValue Div(StyleValue right)
{
if(right is StyleColor)
{
var other = right as StyleColor;
return new StyleColor {Value = Value/other.Value};
}
if(right is StyleNumber)
{
var other = right as StyleNumber;
if(!string.IsNullOrEmpty(other.UnitOfMeasure))
{
throw new ArgumentException();
}
return new StyleColor {Value = (int)(Value/other.Value)};
}
throw new ArgumentException();
}
}