def addPointOnPath(path, pathIndex, pixelTable, point, pointIndex, width):
 pointIndexMinusOne = (pointIndex - 1)
 if ((pointIndex < len(path)) and (pointIndexMinusOne >= 0)):
  segmentTable = {}
  begin = path[pointIndexMinusOne]
  end = path[pointIndex]
  euclidean.addValueSegmentToPixelTable(begin, end, segmentTable, pathIndex, width)
  euclidean.removePixelTableFromPixelTable(segmentTable, pixelTable)
 if (pointIndexMinusOne >= 0):
  begin = path[pointIndexMinusOne]
  euclidean.addValueSegmentToPixelTable(begin, point, pixelTable, pathIndex, width)
 if (pointIndex < len(path)):
  end = path[pointIndex]
  euclidean.addValueSegmentToPixelTable(point, end, pixelTable, pathIndex, width)
 path.insert(pointIndex, point)

def addPointOnPath ( path , pathIndex , pixelTable , point , pointIndex , width ) : pointIndexMinusOne = ( pointIndex - 1 ) if ( ( pointIndex < len ( path ) ) and ( pointIndexMinusOne >= 0 ) ) : segmentTable = { } begin = path [ pointIndexMinusOne ] end = path [ pointIndex ] euclidean . addValueSegmentToPixelTable ( begin , end , segmentTable , pathIndex , width ) euclidean . removePixelTableFromPixelTable ( segmentTable , pixelTable ) if ( pointIndexMinusOne >= 0 ) : begin = path [ pointIndexMinusOne ] euclidean . addValueSegmentToPixelTable ( begin , point , pixelTable , pathIndex , width ) if ( pointIndex < len ( path ) ) : end = path [ pointIndex ] euclidean . addValueSegmentToPixelTable ( point , end , pixelTable , pathIndex , width ) path . insert ( pointIndex , point )
add a point to a path and the pixel table .