(self, offset, amount, fill=0)
Adds `amount` lines to the pixel array starting at `offset` and fills them with `fill`.
Adds `amount` lines to the pixel array starting at `offset` and fills them with `fill`.
Adds amount lines to the pixel array starting at offset and fills them with fill .
def add_lines(self, offset, amount, fill=0):
        """
        Adds `amount` lines to the pixel array starting at `offset` and fills them with `fill`.
        """
        if not amount:
            return
            # special case for adding to the end of the array:
        if offset == self.height:
            self.data.extend(array.array(self.data.typecode, [fill] *  self.line_length * amount))
        else:
            start = offset * self.line_length
            self.data[start:start] = array.array(self.data.typecode, [fill] *  self.line_length * amount)
        self.height += amount
        self._precalculate()
def add_lines ( self , offset , amount , fill = 0 ) : if not amount : return # special case for adding to the end of the array: if offset == self . height : self . data . extend ( array . array ( self . data . typecode , [ fill ] * self . line_length * amount ) ) else : start = offset * self . line_length self . data [ start : start ] = array . array ( self . data . typecode , [ fill ] * self . line_length * amount ) self . height += amount self . _precalculate ( )