Exemplo n.º 1
0
 public Color GetBackGradientEndColor(Style style, StyleInstance styleInstance, bool hasScope)
 {
     if (style != null && (!MappingHelper.IsPropertyExpression(style.BackgroundGradientEndColor) || hasScope))
     {
         return(MappingHelper.GetStyleBackGradientEndColor(style, styleInstance));
     }
     return(Color.Empty);
 }
Exemplo n.º 2
0
 public GradientType GetGradientType(Style style, StyleInstance styleInstance, bool hasScope)
 {
     if (style != null && (!MappingHelper.IsPropertyExpression(style.BackgroundGradientType) || hasScope))
     {
         return(MapMapper.GetGradientType(style, styleInstance));
     }
     return(GradientType.None);
 }
Exemplo n.º 3
0
 public MapHatchStyle GetHatchStyle(Style style, StyleInstance styleInstance, bool hasScope)
 {
     if (style != null && (!MappingHelper.IsPropertyExpression(style.BackgroundHatchType) || hasScope))
     {
         return(MapMapper.GetHatchStyle(style, styleInstance));
     }
     return(MapHatchStyle.None);
 }
Exemplo n.º 4
0
 public int GetShadowOffset(Style style, StyleInstance styleInstance, bool hasScope)
 {
     if (style != null && (!MappingHelper.IsPropertyExpression(style.ShadowOffset) || hasScope))
     {
         return(MapMapper.GetValidShadowOffset(MappingHelper.GetStyleShadowOffset(style, styleInstance, this.m_mapMapper.DpiX)));
     }
     return(0);
 }
Exemplo n.º 5
0
 public Color GetTextColor(Style style, StyleInstance styleInstance, bool hasScope)
 {
     if (style != null && (!MappingHelper.IsPropertyExpression(style.Color) || hasScope))
     {
         return(MappingHelper.GetStyleColor(style, styleInstance));
     }
     return(MappingHelper.DefaultColor);
 }
Exemplo n.º 6
0
 public 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);
 }
Exemplo n.º 7
0
 public 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, this.m_mapMapper.DpiX));
         }
     }
     return(MappingHelper.GetDefaultBorderWidth(this.m_mapMapper.DpiX));
 }
Exemplo n.º 8
0
 public Color GetBackgroundColor(Style style, StyleInstance styleInstance, bool hasScope)
 {
     if (style == null)
     {
         return(MappingHelper.DefaultBackgroundColor);
     }
     if (MappingHelper.IsPropertyExpression(style.BackgroundColor) && !hasScope)
     {
         return(MappingHelper.DefaultBackgroundColor);
     }
     return(MappingHelper.GetStyleBackgroundColor(style, styleInstance));
 }
Exemplo n.º 9
0
        public Font GetFont(Style style, StyleInstance styleInstance, bool hasScope)
        {
            if (style == null)
            {
                return(this.m_mapMapper.GetDefaultFontFromCache(0));
            }
            string text = MappingHelper.DefaultFontFamily;

            if (this.m_mapMapper.GetDefaultFont() != null)
            {
                text = this.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(this.m_mapMapper.GetFontFromCache(0, text, fontSize, fontStyle, fontWeight, textDecoration));
        }