Example #1
0
        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;
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PointSymbolizer"/> class with one member that constructed
        /// based on the values specified.
        /// </summary>
        /// <param name="color">The color of the symbol.</param>
        /// <param name="shape">The shape of the symbol.</param>
        /// <param name="size">The size of the symbol.</param>
        public PointSymbolizer(Color color, PointShape shape, double size)
        {
            Smoothing = true;
            Symbols   = new CopyList <ISymbol>();
            ISimpleSymbol ss = new SimpleSymbol(color, shape, size);

            Symbols.Add(ss);
        }
Example #3
0
        private void Configure()
        {
            Symbols = new CopyList <ISymbol>();
            ISimpleSymbol ss = new SimpleSymbol();

            ss.Color      = SymbologyGlobal.RandomColor();
            ss.Opacity    = 1F;
            ss.PointShape = PointShape.Rectangle;
            Smoothing     = true;
            ScaleMode     = ScaleMode.Symbolic;
            Symbols.Add(ss);
        }
Example #4
0
 /// <summary>
 /// Creates a point symbolizer with one member, and that member is constructed
 /// based on the values specified.
 /// </summary>
 /// <param name="color"></param>
 /// <param name="shape"></param>
 /// <param name="size"></param>
 public PointSymbolizer(Color color, PointShape shape, double size)
 {
     base.Smoothing = true;
     _symbols = new CopyList<ISymbol>();
     ISimpleSymbol ss = new SimpleSymbol(color, shape, size);
     _symbols.Add(ss);
 }
Example #5
0
 private void Configure()
 {
     _symbols = new CopyList<ISymbol>();
     ISimpleSymbol ss = new SimpleSymbol();
     ss.Color = SymbologyGlobal.RandomColor();
     ss.Opacity = 1F;
     ss.PointShape = PointShape.Rectangle;
     Smoothing = true;
     ScaleMode = ScaleMode.Symbolic;
     _symbols.Add(ss);
 }
Example #6
0
 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>
 /// Initializes a new instance of the <see cref="PointSchemeFactory"/> class where the data table is specified.
 /// </summary>
 /// <param name="table">Datatable that is used.</param>
 public PointSchemeFactory(DataTable table)
 {
     Table    = table;
     Template = new SimpleSymbol(Color.Green, PointShape.Ellipse, 4);
 }
Example #8
0
 public DotSpatial.Symbology.IPointSymbolizer ToPointSymbolizer()
 {
     SimpleSymbol s = new SimpleSymbol(this.Color.ToDrawingColor(), this.PointShape, this.PointSize);
     s.OutlineColor = this.PointBorderColor.ToDrawingColor();
     s.OutlineWidth = this.PointBorderSize;
     s.PointShape = this.PointShape;
     s.OutlineOpacity = 1f;
     s.UseOutline = true;
     DotSpatial.Symbology.PointSymbolizer symbolizer = new DotSpatial.Symbology.PointSymbolizer(s);
     return symbolizer;
 }