GetSimpleShapeEffect
(
GraphDrawingContext oGraphDrawingContext,
Double dRadius,
Color oColor
)
{
Debug.Assert(oGraphDrawingContext != null);
Debug.Assert(dRadius >= 0);
AssertValid();
switch (m_eEffect)
{
case VertexEffect.None:
return (null);
case VertexEffect.OuterGlow:
// The following mapping was determined experimentally.
Double dGlowSize = MathUtil.TransformValueToRange(
(Single)(dRadius * m_dRelativeOuterGlowSize),
3F, 300F,
4F, 180F
);
return ( GetEffectForOuterGlow(oColor, dGlowSize, 0.9) );
case VertexEffect.DropShadow:
// The following mapping was determined experimentally.
Double dShadowDepth = MathUtil.TransformValueToRange(
(Single)(dRadius),
3F, 50F,
4F, 20F
);
return ( GetEffectForDropShadow(oGraphDrawingContext,
dShadowDepth, 0.6) );
default:
Debug.Assert(false);
return (null);
}
}