Logo Search packages:      
Sourcecode: uligo version File versions  Download package

def board1::Board::getPixelCoord (   self,
  pos,
  nonfuzzy = 0 
)

transform go board coordinates into pixel coord. on the canvas of size canvSize 

Definition at line 393 of file board1.py.

00393                                               :
        """ transform go board coordinates into pixel coord. on the canvas of size canvSize """

        fuzzy1 = randint(-1,1) * self.fuzzy.get() * (1-nonfuzzy)
        fuzzy2 = randint(-1,1) * self.fuzzy.get() * (1-nonfuzzy)
        c1 = self.canvasSize[1]
        a = self.canvasSize[0] - self.canvasSize[1] - self.canvasSize[1]/2 
        b = self.canvasSize[0] - self.canvasSize[1] + self.canvasSize[1]/2 
        return (c1*pos[0]+a+fuzzy1, c1*pos[1]+a+fuzzy2, c1*pos[0]+b+fuzzy1, c1*pos[1]+b+fuzzy2) 

    def getBoardCoord(self, pos, sloppy=1):


Generated by  Doxygen 1.6.0   Back to index