Пример #1
0
 def drawBitmap(self, x, y, sx, sy, data, mode = 24, colortable = None):
     self.setXY(x, y, x + sx - 1, y + sy - 1)
     if mode == 24:
         TFT_io.displaySCR_AS(data, sx * sy)
     elif mode == 16:
         TFT_io.displaySCR565_AS(data, sx * sy)
     elif mode == 1:
         if colortable is None:
             colortable = self.BMPcolortable # create colortable
         TFT_io.displaySCR_bmp(data, sx*sy, 1, colortable)
     elif mode == 2:
         if colortable is None:
             return
         TFT_io.displaySCR_bmp(data, sx*sy, 2, colortable)
     elif mode == 4:
         if colortable is None:
             return
         TFT_io.displaySCR_bmp(data, sx*sy, 4, colortable)
     elif mode == 8:
         if colortable is None:
             return
         TFT_io.displaySCR_bmp(data, sx*sy, 8, colortable)
Пример #2
0
 def drawPixel_py(self, x, y, color):
     self.setXY(x, y, x, y)
     TFT_io.displaySCR_AS(color, 1)  #