Python pyqrcode如何更改位置检测模式?

Python pyqrcode如何更改位置检测模式?,python,python-3.x,Python,Python 3.x,你好,我正在尝试使用pyqrcode。如何更改位置检测模式,使其成为圆形而不是矩形 我正在看表格文档,也许我能从中找到一些东西 def添加位置模式(自我,m): “”“此方法将位置调整图案绘制到QR上 所有大于一个的二维码版本都需要这些特殊的盒子 称为位置调整模式。 """ #版本1没有位置调整模式 如果self.version==1: 返回 如果可能的话,有参考资料吗 #Get the coordinates for where to place the boxes coordinates =

你好,我正在尝试使用pyqrcode。如何更改位置检测模式,使其成为圆形而不是矩形

我正在看表格文档,也许我能从中找到一些东西

def添加位置模式(自我,m): “”“此方法将位置调整图案绘制到QR上 所有大于一个的二维码版本都需要这些特殊的盒子 称为位置调整模式。 """ #版本1没有位置调整模式 如果self.version==1: 返回

如果可能的话,有参考资料吗

#Get the coordinates for where to place the boxes
coordinates = tables.position_adjustment[self.version]

#Get the max and min coordinates to handle special cases
min_coord = coordinates[0]
max_coord = coordinates[-1]

#Draw a box at each intersection of the coordinates
for i in coordinates:
    for j in coordinates:
        #Do not draw these boxes because they would
        #interfere with the detection pattern
        if (i == min_coord and j == min_coord) or \
                (i == min_coord and j == max_coord) or \
                (i == max_coord and j == min_coord):
            continue

        #Center black pixel
        m[i][j] = 1

        #Surround the pixel with a white box
        for x in [-1,1]:
            m[i+x][j+x] = 0
            m[i+x][j] = 0
            m[i][j+x] = 0
            m[i-x][j+x] = 0
            m[i+x][j-x] = 0

        #Surround the white box with a black box
        for x in [-2,2]:
            for y in [0,-1,1]:
                m[i+x][j+x] = 1
                m[i+x][j+y] = 1
                m[i+y][j+x] = 1
                m[i-x][j+x] = 1
                m[i+x][j-x] = 1