Exemplo n.º 1
0
 /// <summary>
 /// Extracts style information.
 /// </summary>
 /// <param name="point"></param>
 /// <returns></returns>
 public static Point2DStyle From(Point2D point, int layer)
 {
     Point2DStyle newStyle = new Point2DStyle();
     newStyle.Color = point.Color;
     newStyle.MaxZoom = point.MaxZoom;
     newStyle.MinZoom = point.MinZoom;
     newStyle.Layer = layer;
     return newStyle;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Sets style information.
 /// </summary>
 /// <param name="point"></param>
 public void Set(Point2D point)
 {
     point.Color = this.Color;
     point.MaxZoom = this.MaxZoom;
     point.MinZoom = this.MinZoom;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Adds a new style and returns it's index.
 /// </summary>
 /// <param name="point"></param>
 /// <param name="layer"></param>
 /// <returns></returns>
 public ushort AddStyle(Point2D point, int layer)
 {
     Point2DStyle newStyle = Point2DStyle.From(point, layer);
     int indexOf = this.PointStyles.IndexOf(newStyle);
     if (indexOf < 0)
     { // the style is not found yet.
         indexOf = this.PointStyles.Count;
         this.PointStyles.Add(newStyle);
     }
     return (ushort)indexOf;
 }