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; }
/// <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); }
/// <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); }
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; }