/// <summary>
 /// Extracts style information.
 /// </summary>
 /// <param name="lineText"></param>
 /// <returns></returns>
 public static LineText2DStyle From(LineText2D lineText, int layer)
 {
     LineText2DStyle newStyle = new LineText2DStyle();
     newStyle.Color = lineText.Color;
     newStyle.MaxZoom = lineText.MaxZoom;
     newStyle.MinZoom = lineText.MinZoom;
     newStyle.HaloColor = lineText.HaloColor;
     newStyle.HaloRadius = lineText.HaloRadius;
     newStyle.Layer = layer;
     newStyle.Size = lineText.Size;
     return newStyle;
 }
 /// <summary>
 /// Sets the style information.
 /// </summary>
 /// <param name="lineText"></param>
 public void Set(LineText2D lineText)
 {
     lineText.Color = this.Color;
     lineText.MaxZoom = this.MaxZoom;
     lineText.MinZoom = this.MinZoom;
     lineText.HaloColor = this.HaloColor;
     lineText.HaloRadius = this.HaloRadius;
     lineText.Size = this.Size;
 }
 /// <summary>
 /// Adds a new style and returns it's index.
 /// </summary>
 /// <param name="lineText"></param>
 /// <param name="layer"></param>
 /// <returns></returns>
 public ushort AddStyle(LineText2D lineText, int layer)
 {
     LineText2DStyle newStyle = LineText2DStyle.From(lineText, layer);
     int indexOf = this.LineTextStyles.IndexOf(newStyle);
     if (indexOf < 0)
     { // the style is not found yet.
         indexOf = this.LineTextStyles.Count;
         this.LineTextStyles.Add(newStyle);
     }
     return (ushort)indexOf;
 }