protected virtual void RenderLineTemplate(MapLineTemplate mapLineTemplate, Path corePath, bool ignoreBackgroundColor, bool ignoreSize, bool hasScope) { if (mapLineTemplate == null) { base.RenderStyle(null, null, corePath, ignoreBackgroundColor, hasScope); } else { base.RenderSpatialElementTemplate(mapLineTemplate, corePath, ignoreBackgroundColor, hasScope); Style style = mapLineTemplate.Style; StyleInstance style2 = mapLineTemplate.Instance.Style; corePath.LineStyle = base.GetBorderStyle(style, style2, hasScope); if (!ignoreSize) { int size = this.GetSize(mapLineTemplate, hasScope); corePath.Width = (float)size; } ReportEnumProperty <MapLineLabelPlacement> labelPlacement = mapLineTemplate.LabelPlacement; PathLabelPosition labelPosition = PathLabelPosition.Above; if (labelPlacement != null) { if (!labelPlacement.IsExpression) { labelPosition = this.GetLabelPosition(labelPlacement.Value); } else if (hasScope) { labelPosition = this.GetLabelPosition(mapLineTemplate.Instance.LabelPlacement); } } corePath.LabelPosition = labelPosition; } }
public void Render(MapLine mapLine, Path corePath, bool hasScope) { bool flag = this.UseCustomTemplate(mapLine, hasScope); MapLineTemplate mapLineTemplate = (!flag) ? this.MapLineLayer.MapLineTemplate : mapLine.MapLineTemplate; this.RenderLineTemplate(mapLineTemplate, corePath, !flag && this.m_lineLayerMapper.HasColorRule(corePath) && hasScope, !flag && this.m_lineLayerMapper.HasSizeRule(corePath) && hasScope, hasScope); }
public int GetSize(MapLineTemplate mapLineTemplate, bool hasScope) { ReportSizeProperty width = mapLineTemplate.Width; if (width != null) { if (!width.IsExpression) { return(MappingHelper.ToIntPixels(width.Value, base.m_mapMapper.DpiX)); } if (hasScope) { return(MappingHelper.ToIntPixels(mapLineTemplate.Instance.Width, base.m_mapMapper.DpiX)); } return(LineTemplateMapper.GetDefaultSize(base.m_mapMapper.DpiX)); } return(LineTemplateMapper.GetDefaultSize(base.m_mapMapper.DpiX)); }
public MapLineTemplateInstance(MapLineTemplate defObject) : base(defObject) { this.m_defObject = defObject; }