コード例 #1
0
ファイル: Symbol.cs プロジェクト: vahidarr/DotSpatial
        private void SetInnerSymbol(SymbolType type)
        {
            ISymbol newSymbol = null;

            // If this class is acting as a wrapper class, then it should update the internal IStroke.
            switch (type)
            {
            case SymbolType.Character:
                newSymbol = new CharacterSymbol();
                break;

            case SymbolType.Picture:
                newSymbol = new PictureSymbol();
                break;

            case SymbolType.Simple:
                newSymbol = new SimpleSymbol();
                break;
            }
            if (newSymbol != null)
            {
                if (_innerSymbol != null)
                {
                    newSymbol.CopyPlacement(_innerSymbol);
                }
            }
            _innerSymbol = newSymbol;
        }
コード例 #2
0
ファイル: PointSymbolizer.cs プロジェクト: rajGSC/DotSpatial
        /// <summary>
        /// Creates a new point symbolizer that has a character symbol based on the specified characteristics.
        /// </summary>
        /// <param name="character">The character to draw</param>
        /// <param name="fontFamily">The font family to use for rendering the font</param>
        /// <param name="color">The font color</param>
        /// <param name="size">The size of the symbol</param>
        public PointSymbolizer(char character, string fontFamily, Color color, double size)
        {
            _symbols = new CopyList <ISymbol>();
            CharacterSymbol cs = new CharacterSymbol(character, fontFamily, color, size);

            _symbols.Add(cs);
        }
コード例 #3
0
 /// <summary>
 /// Creates a new point symbolizer that has a character symbol based on the specified characteristics.
 /// </summary>
 /// <param name="character">The character to draw</param>
 /// <param name="fontFamily">The font family to use for rendering the font</param>
 /// <param name="color">The font color</param>
 /// <param name="size">The size of the symbol</param>
 public PointSymbolizer(char character, string fontFamily, Color color, double size)
 {
     _symbols = new CopyList<ISymbol>();
     CharacterSymbol cs = new CharacterSymbol(character, fontFamily, color, size);
     _symbols.Add(cs);
 }
コード例 #4
0
ファイル: Symbol.cs プロジェクト: ExRam/DotSpatial-PCL
 private void SetInnerSymbol(SymbolType type)
 {
     ISymbol newSymbol = null;
     // If this class is acting as a wrapper class, then it should update the internal IStroke.
     switch (type)
     {
         case SymbolType.Character:
             newSymbol = new CharacterSymbol();
             break;
         case SymbolType.Picture:
             newSymbol = new PictureSymbol();
             break;
         case SymbolType.Simple:
             newSymbol = new SimpleSymbol();
             break;
     }
     if (newSymbol != null)
     {
         if (_innerSymbol != null) newSymbol.CopyPlacement(_innerSymbol);
     }
     _innerSymbol = newSymbol;
 }