示例#1
0
文件: st7783.cpp 项目: ADTL/stm32plus
    void drawCompressedBitmap(uint8_t *pixels,uint32_t size,uint16_t width,uint16_t height,bool useDma,DmaFsmcLcdMemoryCopyFeature<LcdAccessMode>& dma) {

      _gl->setBackground(ColourNames::WHITE);
      _gl->clearScreen();

      LinearBufferInputOutputStream compressedData(pixels,size);
      LzgDecompressionStream decompressor(compressedData,size);

      if(useDma) {
        _gl->drawBitmap(
            Rectangle(((_gl->getXmax()+1)-width)/2,
                ((_gl->getYmax()+1)-height)/2,
                width,height),
                decompressor,
                dma);
      }
      else {
        _gl->drawBitmap(
            Rectangle(((_gl->getXmax()+1)-width)/2,
                ((_gl->getYmax()+1)-height)/2,
                width,height),
                decompressor);
      }

      MillisecondTimer::delay(3000);
    }
示例#2
0
    void drawCompressedBitmap(uint8_t *pixels,uint32_t size,uint16_t width,uint16_t height) {

      _gl->setBackground(ColourNames::WHITE);
      _gl->clearScreen();

      LinearBufferInputOutputStream compressedData(pixels,size);
      LzgDecompressionStream decompressor(compressedData,size);

      _gl->drawBitmap(
          Rectangle((_gl->getWidth()-width)/2,
              (_gl->getHeight()-height)/2,
              width,height),
              decompressor);

      MillisecondTimer::delay(3000);
    }