internal Color GetBackGradientEndColor(Style style, StyleInstance styleInstance, bool hasScope)
 {
     if (style != null && (!MappingHelper.IsPropertyExpression(style.BackgroundGradientEndColor) || hasScope))
     {
         return(MappingHelper.GetStyleBackGradientEndColor(style, styleInstance));
     }
     return(Color.Empty);
 }
 internal GradientType GetGradientType(Style style, StyleInstance styleInstance, bool hasScope)
 {
     if (style != null && (!MappingHelper.IsPropertyExpression(style.BackgroundGradientType) || hasScope))
     {
         return(MapMapper.GetGradientType(style, styleInstance));
     }
     return(GradientType.None);
 }
 internal MapHatchStyle GetHatchStyle(Style style, StyleInstance styleInstance, bool hasScope)
 {
     if (style != null && (!MappingHelper.IsPropertyExpression(style.BackgroundHatchType) || hasScope))
     {
         return(MapMapper.GetHatchStyle(style, styleInstance));
     }
     return(MapHatchStyle.None);
 }
 internal int GetShadowOffset(Style style, StyleInstance styleInstance, bool hasScope)
 {
     if (style != null && (!MappingHelper.IsPropertyExpression(style.ShadowOffset) || hasScope))
     {
         return(MapMapper.GetValidShadowOffset(MappingHelper.GetStyleShadowOffset(style, styleInstance, m_mapMapper.DpiX)));
     }
     return(0);
 }
 internal Color GetTextColor(Style style, StyleInstance styleInstance, bool hasScope)
 {
     if (style != null && (!MappingHelper.IsPropertyExpression(style.Color) || hasScope))
     {
         return(MappingHelper.GetStyleColor(style, styleInstance));
     }
     return(MappingHelper.DefaultColor);
 }
 internal Color GetBorderColor(Style style, StyleInstance styleInstance, bool hasScope)
 {
     if (style != null)
     {
         Border border = style.Border;
         if (border != null && (!MappingHelper.IsPropertyExpression(border.Color) || hasScope))
         {
             return(MappingHelper.GetStyleBorderColor(border));
         }
     }
     return(MappingHelper.DefaultBorderColor);
 }
 internal int GetBorderWidth(Style style, StyleInstance styleInstance, bool hasScope)
 {
     if (style != null)
     {
         Border border = style.Border;
         if (border != null && (!MappingHelper.IsPropertyExpression(border.Width) || hasScope))
         {
             return(MappingHelper.GetStyleBorderWidth(border, m_mapMapper.DpiX));
         }
     }
     return(MappingHelper.GetDefaultBorderWidth(m_mapMapper.DpiX));
 }
 internal Color GetBackgroundColor(Style style, StyleInstance styleInstance, bool hasScope)
 {
     if (style == null)
     {
         return(MappingHelper.DefaultBackgroundColor);
     }
     if (!MappingHelper.IsPropertyExpression(style.BackgroundColor) || hasScope)
     {
         return(MappingHelper.GetStyleBackgroundColor(style, styleInstance));
     }
     return(MappingHelper.DefaultBackgroundColor);
 }
        internal Font GetFont(Style style, StyleInstance styleInstance, bool hasScope)
        {
            if (style == null)
            {
                return(m_mapMapper.GetDefaultFontFromCache(0));
            }
            string text = MappingHelper.DefaultFontFamily;

            if (m_mapMapper.GetDefaultFont() != null)
            {
                text = m_mapMapper.GetDefaultFont().Name;
            }
            if (!MappingHelper.IsPropertyExpression(style.FontFamily) || hasScope)
            {
                text = MappingHelper.GetStyleFontFamily(style, styleInstance, text);
            }
            float           fontSize       = (!(!MappingHelper.IsPropertyExpression(style.FontSize) || hasScope)) ? MappingHelper.DefaultFontSize : MappingHelper.GetStyleFontSize(style, styleInstance);
            FontStyles      fontStyle      = (!(!MappingHelper.IsPropertyExpression(style.FontStyle) || hasScope)) ? FontStyles.Normal : MappingHelper.GetStyleFontStyle(style, styleInstance);
            FontWeights     fontWeight     = (!(!MappingHelper.IsPropertyExpression(style.FontWeight) || hasScope)) ? FontWeights.Normal : MappingHelper.GetStyleFontWeight(style, styleInstance);
            TextDecorations textDecoration = (!(!MappingHelper.IsPropertyExpression(style.TextDecoration) || hasScope)) ? TextDecorations.None : MappingHelper.GetStyleFontTextDecoration(style, styleInstance);

            return(m_mapMapper.GetFontFromCache(0, text, fontSize, fontStyle, fontWeight, textDecoration));
        }