def mirror_path_over_axis(path, axis, width):
    # TODO: add vertical flipping ;)

    # check to see if path is empty or doesn't exist
    if (path == None) or (path == ''):
        return

    # convert path to relative coordinates; this simplifies the mirroring
    relative_path = absolute_to_relative_path(path)
 
    # get SVG path grammar
    look_for = svg_grammar()    
 
    # parse the input based on this grammar
    pd = look_for.parseString(relative_path)

    p = ''
 
    for i in range(0, len(pd)):

        pcmd = pd[i][0]

        if re.match('m', pcmd):
 
            if i == 0:
                p += 'm ' + str(width - float(pd[i][1][0])) + ',' + str(pd[i][1][1]) + ' '
            else:
                p += 'm ' + str(-float(pd[i][1][0])) + ',' + str(pd[i][1][1]) + ' '
 
            for coord in pd[i][2:]:
                p += str(-float(coord[0])) + ',' + coord[1] + ' '

        else:
            p += pd[i][0]+' '
            for coord in pd[i][1:]:
                if len(coord) > 1:
                    p += str(-float(coord[0])) + ',' + str(float(coord[1])) + ' '
                else:
                    if pd[i][0] == 'h':
                        p += str(-float(coord[0])) + ' '
                    else:
                        p += str(float(coord[0])) + ' '

    return p
Print version information and exit.
dataset/ETHPy150Open boldport/pcbmode/pcbmode/utils/svg.py/mirror_path_over_axis--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/scripts/_twistw.py/ServerOptions.opt_version