public void RenderPolygonCenterPoint(MapPolygon mapPolygon, Symbol coreSymbol, bool hasScope)
        {
            bool             flag             = PointTemplateMapper.PolygonUseCustomTemplate(mapPolygon, hasScope);
            MapPointTemplate mapPointTemplate = (!flag) ? this.m_vectorLayerMapper.GetMapPointTemplate() : mapPolygon.MapCenterPointTemplate;

            this.RenderPointTemplate(mapPointTemplate, coreSymbol, flag, !flag && this.m_vectorLayerMapper.HasPointColorRule(coreSymbol) && hasScope, !flag && this.m_vectorLayerMapper.HasPointSizeRule(coreSymbol) && hasScope, !flag && this.m_vectorLayerMapper.HasMarkerRule(coreSymbol) && hasScope, hasScope);
        }
        public void Render(MapPoint mapPoint, Symbol coreSymbol, bool hasScope)
        {
            bool             flag             = PointTemplateMapper.UseCustomTemplate(mapPoint, hasScope);
            MapPointTemplate mapPointTemplate = (!flag) ? this.MapPointLayer.MapPointTemplate : mapPoint.MapPointTemplate;

            this.RenderPointTemplate(mapPointTemplate, coreSymbol, flag, !flag && this.m_vectorLayerMapper.HasPointColorRule(coreSymbol) && hasScope, !flag && this.m_vectorLayerMapper.HasPointSizeRule(coreSymbol) && hasScope, !flag && this.m_vectorLayerMapper.HasMarkerRule(coreSymbol) && hasScope, hasScope);
        }
Exemplo n.º 3
0
 private bool HasCenterPointTemplate(MapPolygon mapPolygon, MapPointTemplate pointTemplate, bool hasScope)
 {
     if (mapPolygon != null && PointTemplateMapper.PolygonUseCustomTemplate(mapPolygon, hasScope))
     {
         return(mapPolygon.MapCenterPointTemplate != null);
     }
     return(pointTemplate != null);
 }
 private int?GetLegendSymbolSize()
 {
     if (this.m_pointTemplateMapper == null)
     {
         return(PointTemplateMapper.GetDefaultSymbolSize(this.m_mapMapper.DpiX));
     }
     return(this.m_pointTemplateMapper.GetSize(this.GetMapPointTemplate(), false));
 }
Exemplo n.º 5
0
        public void RenderSymbolRule(PointTemplateMapper symbolTemplateMapper, Color?color, MarkerStyle?markerStyle)
        {
            SymbolRule symbolRule = (SymbolRule)base.m_coreRule;

            base.SetRuleLegendProperties(symbolRule);
            base.SetRuleDistribution(symbolRule);
            this.SetSymbolRuleSizes(symbolRule.PredefinedSymbols);
            this.InitializePredefinedSymbols(symbolRule.PredefinedSymbols, symbolTemplateMapper, color, markerStyle);
        }
        public void RenderPointRule(PointTemplateMapper pointTemplateMapper, Color?color, int?size)
        {
            SymbolRule symbolRule = (SymbolRule)base.m_coreRule;

            base.SetRuleLegendProperties(symbolRule);
            base.SetRuleDistribution(symbolRule);
            this.SetSymbolRuleMarkers(symbolRule.PredefinedSymbols);
            this.InitializePredefinedSymbols(symbolRule.PredefinedSymbols, pointTemplateMapper, color, size);
        }
        public int GetSize(MapPointTemplate mapPointTemplate, bool hasScope)
        {
            ReportSizeProperty size = mapPointTemplate.Size;

            if (size != null)
            {
                if (!size.IsExpression)
                {
                    return(MappingHelper.ToIntPixels(size.Value, base.m_mapMapper.DpiX));
                }
                if (hasScope)
                {
                    return(MappingHelper.ToIntPixels(mapPointTemplate.Instance.Size, base.m_mapMapper.DpiX));
                }
                return(PointTemplateMapper.GetDefaultSymbolSize(base.m_mapMapper.DpiX));
            }
            return(PointTemplateMapper.GetDefaultSymbolSize(base.m_mapMapper.DpiX));
        }
Exemplo n.º 8
0
        public void RenderSymbolRule(PointTemplateMapper symbolTemplateMapper, int?size, MarkerStyle?markerStyle)
        {
            SymbolRule symbolRule = (SymbolRule)base.m_coreRule;

            base.SetRuleLegendProperties(symbolRule);
            base.SetRuleDistribution(symbolRule);
            symbolRule.ShowInColorSwatch = this.GetShowInColorScale();
            if (base.m_mapRule is MapColorRangeRule)
            {
                this.RenderSymbolColorRangeRule(symbolRule);
            }
            else if (base.m_mapRule is MapColorPaletteRule)
            {
                this.RenderSymbolColorPaletteRule(symbolRule);
            }
            else
            {
                this.SetSymbolRuleColors(this.GetCustomColors(((MapCustomColorRule)base.m_mapRule).MapCustomColors), symbolRule.PredefinedSymbols);
            }
            this.InitializePredefinedSymbols(symbolRule.PredefinedSymbols, symbolTemplateMapper, size, markerStyle);
        }
Exemplo n.º 9
0
 private void InitializePredefinedSymbols(PredefinedSymbolCollection predefinedSymbols, PointTemplateMapper symbolTemplateMapper, Color?color, MarkerStyle?markerStyle)
 {
     foreach (PredefinedSymbol predefinedSymbol in predefinedSymbols)
     {
         if (color.HasValue)
         {
             predefinedSymbol.Color = color.Value;
         }
         if (markerStyle.HasValue)
         {
             predefinedSymbol.MarkerStyle = markerStyle.Value;
         }
         base.InitializePredefinedSymbols(predefinedSymbol, symbolTemplateMapper);
     }
 }
 private void InitializePredefinedSymbols(PredefinedSymbolCollection predefinedSymbols, PointTemplateMapper spatialElementTemplateMapper, Color?color, int?size)
 {
     foreach (PredefinedSymbol predefinedSymbol4 in predefinedSymbols)
     {
         if (color.HasValue)
         {
             predefinedSymbol4.Color = color.Value;
         }
         if (size.HasValue)
         {
             PredefinedSymbol predefinedSymbol2 = predefinedSymbol4;
             PredefinedSymbol predefinedSymbol3 = predefinedSymbol4;
             float            num3 = predefinedSymbol2.Width = (predefinedSymbol3.Height = (float)size.Value);
         }
         base.InitializePredefinedSymbols(predefinedSymbol4, spatialElementTemplateMapper);
     }
 }
Exemplo n.º 11
0
 protected void InitializePredefinedSymbols(PredefinedSymbol predefinedSymbol, PointTemplateMapper symbolTemplateMapper)
 {
     predefinedSymbol.BorderColor    = symbolTemplateMapper.GetBorderColor(false);
     predefinedSymbol.BorderStyle    = symbolTemplateMapper.GetBorderStyle(false);
     predefinedSymbol.BorderWidth    = symbolTemplateMapper.GetBorderWidth(false);
     predefinedSymbol.Font           = symbolTemplateMapper.GetFont(false);
     predefinedSymbol.GradientType   = symbolTemplateMapper.GetGradientType(false);
     predefinedSymbol.HatchStyle     = symbolTemplateMapper.GetHatchStyle(false);
     predefinedSymbol.SecondaryColor = symbolTemplateMapper.GetBackGradientEndColor(false);
     predefinedSymbol.ShadowOffset   = symbolTemplateMapper.GetShadowOffset(false);
     predefinedSymbol.TextColor      = symbolTemplateMapper.GetTextColor(false);
     predefinedSymbol.LegendText     = "";
     predefinedSymbol.Text           = "";
 }
Exemplo n.º 12
0
 private void InitializePredefinedSymbols(PredefinedSymbolCollection predefinedSymbols, PointTemplateMapper symbolTemplateMapper, int?size, MarkerStyle?markerStyle)
 {
     foreach (PredefinedSymbol predefinedSymbol4 in predefinedSymbols)
     {
         if (size.HasValue)
         {
             PredefinedSymbol predefinedSymbol2 = predefinedSymbol4;
             PredefinedSymbol predefinedSymbol3 = predefinedSymbol4;
             float            num3 = predefinedSymbol2.Width = (predefinedSymbol3.Height = (float)size.Value);
         }
         if (markerStyle.HasValue)
         {
             predefinedSymbol4.MarkerStyle = markerStyle.Value;
         }
         base.InitializePredefinedSymbols(predefinedSymbol4, symbolTemplateMapper);
     }
 }