mgrs-ios 1.1.6 Documentation

Class Tile​Draw

public class TileDraw  
  • Tile draw utilities for lines and labels

Methods

draw​Line(_:​_:​_:​_:​_:​)

public static func drawLine(_ line: Line, _ tile: GridTile, _ width: Double, _ color: UIColor?, _ context: CGContext)  
  • Draw the lines on the tile
  • @param lines lines to draw
  • @param tile tile
  • @param grid grid
  • @param context graphics context

add​Line(_:​_:​_:​)

public static func addLine(_ tile: GridTile, _ path: CGMutablePath, _ line: Line)  
  • Add the line to the path
  • @param tile tile
  • @param path line path
  • @param line line to draw

draw​Labels(_:​_:​_:​_:​)

public static func drawLabels(_ labels: [Label], _ buffer: Double, _ tile: GridTile, _ grid: BaseGrid)  
  • Draw the labels on the tile
  • @param labels labels to draw
  • @param buffer grid zone edge buffer
  • @param tile tile
  • @param grid grid

draw​Label(_:​_:​_:​_:​_:​)

public static func drawLabel(_ label: Label, _ buffer: Double, _ tile: GridTile, _ font: UIFont, _ color: UIColor)  
  • Draw the label
  • @param label label to draw
  • @param buffer grid zone edge buffer
  • @param tile tile
  • @param font font
  • @param color color