Logo Search packages:      
Sourcecode: g15daemon version File versions

def g15daemon::g15screen::set_pixel (   self,
  x,
  y,
  pixel 
)

Set a pixel in buffer

Definition at line 125 of file g15daemon.py.

00125                                     :
        """Set a pixel in buffer"""
        if not self.__validate_pixel(pixel):
            return False
        if x < 0 or x >= MAX_X:
            return False
        if y < 0 or y >= MAX_Y:
            return False
        position=x+y*MAX_X
        if x == 0 and y == 0:
            self.screen='%s%s' % (pixel,self.screen[1:])
        elif y == MAX_Y - 1 and x == MAX_X -1:
            self.screen='%s%s' % (self.screen[:-1],pixel)
        else:
            self.screen='%s%s%s' % (
              self.screen[:position],
              pixel,
              self.screen[position+1:]
            )

    def display(self):


Generated by  Doxygen 1.6.0   Back to index