protected virtual void RenderPointTemplate(MapPointTemplate mapPointTemplate, Symbol coreSymbol, bool customTemplate, bool ignoreBackgroundColor, bool ignoreSize, bool ignoreMarker, bool hasScope) { if (mapPointTemplate == null) { RenderStyle(null, null, coreSymbol, ignoreBackgroundColor, hasScope); coreSymbol.BorderStyle = GetBorderStyle(null, null, hasScope); return; } RenderSpatialElementTemplate(mapPointTemplate, coreSymbol, ignoreBackgroundColor, hasScope); Style style = mapPointTemplate.Style; StyleInstance style2 = mapPointTemplate.Instance.Style; coreSymbol.BorderStyle = GetBorderStyle(style, style2, hasScope); if (!ignoreSize) { int size = GetSize(mapPointTemplate, hasScope); float num3 = coreSymbol.Width = (coreSymbol.Height = size); } ReportEnumProperty <MapPointLabelPlacement> labelPlacement = mapPointTemplate.LabelPlacement; TextAlignment textAlignment = TextAlignment.Bottom; if (labelPlacement != null) { if (!labelPlacement.IsExpression) { textAlignment = GetTextAlignment(labelPlacement.Value); } else if (hasScope) { textAlignment = GetTextAlignment(mapPointTemplate.Instance.LabelPlacement); } } coreSymbol.TextAlignment = textAlignment; }
protected virtual void RenderLineTemplate(MapLineTemplate mapLineTemplate, Path corePath, bool ignoreBackgroundColor, bool ignoreSize, bool hasScope) { if (mapLineTemplate == null) { RenderStyle(null, null, corePath, ignoreBackgroundColor, hasScope); return; } RenderSpatialElementTemplate(mapLineTemplate, corePath, ignoreBackgroundColor, hasScope); Style style = mapLineTemplate.Style; StyleInstance style2 = mapLineTemplate.Instance.Style; corePath.LineStyle = GetBorderStyle(style, style2, hasScope); if (!ignoreSize) { int size = GetSize(mapLineTemplate, hasScope); corePath.Width = size; } ReportEnumProperty <MapLineLabelPlacement> labelPlacement = mapLineTemplate.LabelPlacement; PathLabelPosition labelPosition = PathLabelPosition.Above; if (labelPlacement != null) { if (!labelPlacement.IsExpression) { labelPosition = GetLabelPosition(labelPlacement.Value); } else if (hasScope) { labelPosition = GetLabelPosition(mapLineTemplate.Instance.LabelPlacement); } } corePath.LabelPosition = labelPosition; }
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 GradientType GetGradientType(bool hasScope) { Style style = default(Style); StyleInstance styleInstance = default(StyleInstance); this.GetDefaultStyle(out style, out styleInstance); return(this.GetGradientType(style, styleInstance, hasScope)); }
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 int GetShadowOffset(bool hasScope) { Style style = default(Style); StyleInstance styleInstance = default(StyleInstance); this.GetDefaultStyle(out style, out styleInstance); return(this.GetShadowOffset(style, styleInstance, hasScope)); }
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 GetBackGradientEndColor(Style style, StyleInstance styleInstance, bool hasScope) { if (style != null && (!MappingHelper.IsPropertyExpression(style.BackgroundGradientEndColor) || hasScope)) { return(MappingHelper.GetStyleBackGradientEndColor(style, styleInstance)); } return(Color.Empty); }
public MapDashStyle GetBorderStyle(bool hasScope) { Style style = default(Style); StyleInstance styleInstance = default(StyleInstance); this.GetDefaultStyle(out style, out styleInstance); return(this.GetBorderStyle(style, styleInstance, hasScope)); }
internal static RightToLeft GetStyleDirection(Style style, StyleInstance styleInstance) { if ((style.Direction.IsExpression ? styleInstance.Direction : style.Direction.Value) == Directions.RTL) { return(RightToLeft.Yes); } return(RightToLeft.No); }
public int GetBorderWidth(bool hasScope) { Style style = default(Style); StyleInstance styleInstance = default(StyleInstance); this.GetDefaultStyle(out style, out styleInstance); return(this.GetBorderWidth(style, styleInstance, hasScope)); }
public Color GetBorderColor(bool hasScope) { Style style = default(Style); StyleInstance styleInstance = default(StyleInstance); this.GetDefaultStyle(out style, out styleInstance); return(this.GetBorderColor(style, styleInstance, hasScope)); }
internal static ContentAlignment GetStyleContentAlignment(Style style, StyleInstance styleInstance) { TextAlignments styleTextAlign = GetStyleTextAlign(style, styleInstance); VerticalAlignments styleVerticalAlignment = GetStyleVerticalAlignment(style, styleInstance); ContentAlignment result = ContentAlignment.TopLeft; switch (styleTextAlign) { case TextAlignments.Center: switch (styleVerticalAlignment) { case VerticalAlignments.Bottom: result = ContentAlignment.BottomCenter; break; case VerticalAlignments.Middle: result = ContentAlignment.MiddleCenter; break; default: result = ContentAlignment.TopCenter; break; } break; case TextAlignments.Right: switch (styleVerticalAlignment) { case VerticalAlignments.Bottom: result = ContentAlignment.BottomRight; break; case VerticalAlignments.Middle: result = ContentAlignment.MiddleRight; break; default: result = ContentAlignment.TopRight; break; } break; default: switch (styleVerticalAlignment) { case VerticalAlignments.Bottom: result = ContentAlignment.BottomLeft; break; case VerticalAlignments.Middle: result = ContentAlignment.MiddleLeft; break; } break; } return(result); }
internal static VerticalAlignments GetStyleVerticalAlignment(Style style, StyleInstance styleInstance) { ReportEnumProperty <VerticalAlignments> verticalAlign = style.VerticalAlign; if (!verticalAlign.IsExpression) { return(verticalAlign.Value); } return(styleInstance.VerticalAlign); }
internal static BackgroundGradients GetStyleBackGradientType(Style style, StyleInstance styleInstance) { ReportEnumProperty <BackgroundGradients> backgroundGradientType = style.BackgroundGradientType; if (!backgroundGradientType.IsExpression) { return(backgroundGradientType.Value); } return(styleInstance.BackgroundGradientType); }
internal static TextEffects GetStyleTextEffect(Style style, StyleInstance styleInstance) { ReportEnumProperty <TextEffects> textEffect = style.TextEffect; if (!textEffect.IsExpression) { return(textEffect.Value); } return(styleInstance.TextEffect); }
public static RightToLeft GetStyleDirection(Style style, StyleInstance styleInstance) { Directions directions = style.Direction.IsExpression ? styleInstance.Direction : style.Direction.Value; if (directions == Directions.RTL) { return(RightToLeft.Yes); } return(RightToLeft.No); }
internal static TextAlignments GetStyleTextAlign(Style style, StyleInstance styleInstance) { ReportEnumProperty <TextAlignments> textAlign = style.TextAlign; if (!textAlign.IsExpression) { return(textAlign.Value); } return(styleInstance.TextAlign); }
public static BackgroundHatchTypes GetStyleBackgroundHatchType(Style style, StyleInstance styleInstance) { ReportEnumProperty <BackgroundHatchTypes> backgroundHatchType = style.BackgroundHatchType; if (!backgroundHatchType.IsExpression) { return(backgroundHatchType.Value); } return(styleInstance.BackgroundHatchType); }
public MapDashStyle GetBorderStyle(Style style, StyleInstance styleInstance, bool hasScope) { if (style != null) { Border border = style.Border; if (border != null) { return(MapMapper.GetDashStyle(border, hasScope, false)); } } return(MapDashStyle.Solid); }
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)); }
internal static TextDecorations GetStyleFontTextDecoration(Style style, StyleInstance styleInstance) { ReportEnumProperty <TextDecorations> textDecoration = style.TextDecoration; if (IsStylePropertyDefined(textDecoration)) { if (!textDecoration.IsExpression) { return(textDecoration.Value); } return(styleInstance.TextDecoration); } return(TextDecorations.None); }
internal static FontWeights GetStyleFontWeight(Style style, StyleInstance styleInstance) { ReportEnumProperty <FontWeights> fontWeight = style.FontWeight; if (IsStylePropertyDefined(fontWeight)) { if (!fontWeight.IsExpression) { return(fontWeight.Value); } return(styleInstance.FontWeight); } return(FontWeights.Normal); }
internal static FontStyles GetStyleFontStyle(Style style, StyleInstance styleInstance) { ReportEnumProperty <FontStyles> fontStyle = style.FontStyle; if (IsStylePropertyDefined(fontStyle)) { if (!fontStyle.IsExpression) { return(fontStyle.Value); } return(styleInstance.FontStyle); } return(FontStyles.Normal); }
internal static Color GetStyleShadowColor(Style style, StyleInstance styleInstance) { ReportColorProperty shadowColor = style.ShadowColor; Color color = m_defaultShadowColor; if (!GetColorFromReportColorProperty(shadowColor, ref color)) { ReportColor shadowColor2 = styleInstance.ShadowColor; if (shadowColor2 != null) { color = shadowColor2.ToColor(); } } return(color); }
internal static Color GetStyleColor(Style style, StyleInstance styleInstance) { ReportColorProperty color = style.Color; Color color2 = Color.Black; if (!GetColorFromReportColorProperty(color, ref color2)) { ReportColor color3 = styleInstance.Color; if (color3 != null) { color2 = color3.ToColor(); } } return(color2); }
internal static Color GetStyleBackGradientEndColor(Style style, StyleInstance styleInstance) { ReportColorProperty backgroundGradientEndColor = style.BackgroundGradientEndColor; Color color = Color.Empty; if (!GetColorFromReportColorProperty(backgroundGradientEndColor, ref color)) { ReportColor backgroundGradientEndColor2 = styleInstance.BackgroundGradientEndColor; if (backgroundGradientEndColor2 != null) { color = backgroundGradientEndColor2.ToColor(); } } return(color); }
IStyleInstance IStyleEngine.CreateInstance(string StyleName) { StyleInstance myInstance = new StyleInstance(); return myInstance; }