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); }
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); }
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); }
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); }
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); }
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); }
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)); }
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)); }
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)); }