Exemplo n.º 1
0
 public LineLayerMapper(MapLineLayer mapLineLayer, MapControl coreMap, MapMapper mapMapper)
     : base(mapLineLayer, coreMap, mapMapper)
 {
     if (mapLineLayer.MapLineTemplate != null)
     {
         this.m_lineTemplateMapper = new LineTemplateMapper(base.m_mapMapper, this, this.MapLineLayer);
     }
 }
Exemplo n.º 2
0
 private int?GetLegendSize()
 {
     if (this.m_lineTemplateMapper == null)
     {
         return(LineTemplateMapper.GetDefaultSize(base.m_mapMapper.DpiX));
     }
     return(this.m_lineTemplateMapper.GetSize(this.MapLineLayer.MapLineTemplate, false));
 }
Exemplo n.º 3
0
        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));
        }
Exemplo n.º 4
0
        public void RenderLineRule(LineTemplateMapper pathTemplateMapper, int?size)
        {
            PathRule pathRule = (PathRule)base.m_coreRule;

            base.SetRuleLegendProperties(pathRule);
            base.SetRuleDistribution(pathRule);
            pathRule.ShowInColorSwatch = this.GetShowInColorScale();
            if (base.m_mapRule is MapColorRangeRule)
            {
                this.RenderLineColorRangeRule(pathRule);
            }
            else if (base.m_mapRule is MapColorPaletteRule)
            {
                this.RenderLineColorPaletteRule(pathRule);
            }
            else
            {
                this.RenderLineCustomColorRule(pathRule);
            }
            this.InitializePathRule(pathRule, pathTemplateMapper, size);
        }
Exemplo n.º 5
0
 private void InitializePathRule(PathRule pathRule, LineTemplateMapper pathTemplateMapper, int?size)
 {
     this.InitializeCustomColors(pathRule.CustomColors, pathTemplateMapper);
 }