private bool HasCenterPointTemplate(MapPolygon mapPolygon, MapPointTemplate pointTemplate, bool hasScope)
 {
     if (mapPolygon == null || !PointTemplateMapper.PolygonUseCustomTemplate(mapPolygon, hasScope))
     {
         return(pointTemplate != null);
     }
     return(mapPolygon.MapCenterPointTemplate != null);
 }
 private int?GetLegendSymbolSize()
 {
     if (m_pointTemplateMapper == null)
     {
         return(PointTemplateMapper.GetDefaultSymbolSize(m_mapMapper.DpiX));
     }
     return(m_pointTemplateMapper.GetSize(GetMapPointTemplate(), hasScope: false));
 }
示例#3
0
        internal void RenderSymbolRule(PointTemplateMapper symbolTemplateMapper, Color?color, MarkerStyle?markerStyle)
        {
            SymbolRule symbolRule = (SymbolRule)m_coreRule;

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

            SetRuleLegendProperties(symbolRule);
            SetRuleDistribution(symbolRule);
            SetSymbolRuleMarkers(symbolRule.PredefinedSymbols);
            InitializePredefinedSymbols(symbolRule.PredefinedSymbols, pointTemplateMapper, color, size);
        }
示例#5
0
        internal void RenderSymbolRule(PointTemplateMapper symbolTemplateMapper, int?size, MarkerStyle?markerStyle)
        {
            SymbolRule symbolRule = (SymbolRule)m_coreRule;

            SetRuleLegendProperties(symbolRule);
            SetRuleDistribution(symbolRule);
            symbolRule.ShowInColorSwatch = GetShowInColorScale();
            if (m_mapRule is MapColorRangeRule)
            {
                RenderSymbolColorRangeRule(symbolRule);
            }
            else if (m_mapRule is MapColorPaletteRule)
            {
                RenderSymbolColorPaletteRule(symbolRule);
            }
            else
            {
                SetSymbolRuleColors(GetCustomColors(((MapCustomColorRule)m_mapRule).MapCustomColors), symbolRule.PredefinedSymbols);
            }
            InitializePredefinedSymbols(symbolRule.PredefinedSymbols, symbolTemplateMapper, size, markerStyle);
        }
示例#6
0
 private void InitializePredefinedSymbols(PredefinedSymbolCollection predefinedSymbols, PointTemplateMapper symbolTemplateMapper, int?size, MarkerStyle?markerStyle)
 {
     foreach (PredefinedSymbol predefinedSymbol in predefinedSymbols)
     {
         if (size.HasValue)
         {
             float num3 = predefinedSymbol.Width = (predefinedSymbol.Height = size.Value);
         }
         if (markerStyle.HasValue)
         {
             predefinedSymbol.MarkerStyle = markerStyle.Value;
         }
         InitializePredefinedSymbols(predefinedSymbol, symbolTemplateMapper);
     }
 }
示例#7
0
 protected void InitializePredefinedSymbols(PredefinedSymbol predefinedSymbol, PointTemplateMapper symbolTemplateMapper)
 {
     predefinedSymbol.BorderColor    = symbolTemplateMapper.GetBorderColor(hasScope: false);
     predefinedSymbol.BorderStyle    = symbolTemplateMapper.GetBorderStyle(hasScope: false);
     predefinedSymbol.BorderWidth    = symbolTemplateMapper.GetBorderWidth(hasScope: false);
     predefinedSymbol.Font           = symbolTemplateMapper.GetFont(hasScope: false);
     predefinedSymbol.GradientType   = symbolTemplateMapper.GetGradientType(hasScope: false);
     predefinedSymbol.HatchStyle     = symbolTemplateMapper.GetHatchStyle(hasScope: false);
     predefinedSymbol.SecondaryColor = symbolTemplateMapper.GetBackGradientEndColor(hasScope: false);
     predefinedSymbol.ShadowOffset   = symbolTemplateMapper.GetShadowOffset(hasScope: false);
     predefinedSymbol.TextColor      = symbolTemplateMapper.GetTextColor(hasScope: false);
     predefinedSymbol.LegendText     = "";
     predefinedSymbol.Text           = "";
 }
示例#8
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;
         }
         InitializePredefinedSymbols(predefinedSymbol, symbolTemplateMapper);
     }
 }
 private void InitializePredefinedSymbols(PredefinedSymbolCollection predefinedSymbols, PointTemplateMapper spatialElementTemplateMapper, Color?color, int?size)
 {
     foreach (PredefinedSymbol predefinedSymbol in predefinedSymbols)
     {
         if (color.HasValue)
         {
             predefinedSymbol.Color = color.Value;
         }
         if (size.HasValue)
         {
             float num3 = predefinedSymbol.Width = (predefinedSymbol.Height = size.Value);
         }
         InitializePredefinedSymbols(predefinedSymbol, spatialElementTemplateMapper);
     }
 }