示例#1
0
    void jpegTest() {

      prompt("JPEG bitmap test");

      // draw it centered

      LinearBufferInputOutputStream compressedData((uint8_t *)&JpegTest0Pixels,(uint32_t)&JpegTest0PixelsSize);
      _gl->drawJpeg(Rectangle((_gl->getWidth()-240)/2,(_gl->getHeight()-320)/2,240,320),compressedData);

      MillisecondTimer::delay(3000);
    }
示例#2
0
文件: st7783.cpp 项目: ADTL/stm32plus
    void jpegTest() {

      if(_gl->getHeight()==320 && _gl->getWidth()==240) {

        prompt("JPEG bitmap test");

        LinearBufferInputOutputStream compressedData((uint8_t *)&JpegTest0Pixels,(uint32_t)&JpegTest0PixelsSize);
        _gl->drawJpeg(Rectangle(0,0,240,320),compressedData);

        MillisecondTimer::delay(3000);
      }
    }
示例#3
0
    void error(const std::string& str) {

      _tft->setBackground(ColourNames::WHITE);
      _tft->setForeground(ColourNames::BLACK);
      _tft->clearScreen();

      LinearBufferInputOutputStream compressedData((uint8_t *)&ErrorPixels,(uint32_t)&ErrorPixelsSize);
      _tft->drawJpeg(Rectangle(95,135,50,50),compressedData);

      *_tft << Point(2,2) << str.c_str();

      errorRestart();
    }
示例#4
0
    void jpegTest() {

      // only draw in portrait mode and if it can fit on screen

      if(_gl->getHeight()>_gl->getWidth() && _gl->getHeight()>=320 && _gl->getWidth()>=240) {

        prompt("JPEG bitmap test");

        // draw it centered

        LinearBufferInputOutputStream compressedData((uint8_t *)&JpegTest0Pixels,(uint32_t)&JpegTest0PixelsSize);
        _gl->drawJpeg(Rectangle((_gl->getWidth()-240)/2,(_gl->getHeight()-320)/2,240,320),compressedData);

        MillisecondTimer::delay(3000);
      }
    }