当前位置: 首页>>代码示例>>C++>>正文


C++ LcdPanel::getYmax方法代码示例

本文整理汇总了C++中LcdPanel::getYmax方法的典型用法代码示例。如果您正苦于以下问题:C++ LcdPanel::getYmax方法的具体用法?C++ LcdPanel::getYmax怎么用?C++ LcdPanel::getYmax使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LcdPanel的用法示例。


在下文中一共展示了LcdPanel::getYmax方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: drawCompressedBitmap

    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);
    }
开发者ID:ADTL,项目名称:stm32plus,代码行数:26,代码来源:st7783.cpp

示例2: rectTest

    void rectTest() {

      uint32_t i,start;
      Rectangle rc;

      prompt("Rectangle test");

      for(i=0,start=MillisecondTimer::millis();MillisecondTimer::millis()-start<5000;i++) {

        rc.X=(rand() % _gl->getXmax()/2);
        rc.Y=(rand() % _gl->getYmax()/2);
        rc.Width=rand() % (_gl->getXmax()-rc.X);
        rc.Height=rand() % (_gl->getYmax()-rc.Y);

        _gl->setForeground(rand());
        _gl->fillRectangle(rc);
      }

      _gl->clearScreen();

      for(i=0,start=MillisecondTimer::millis();MillisecondTimer::millis()-start<5000;i++) {

        rc.X=(rand() % _gl->getXmax()/2);
        rc.Y=(rand() % _gl->getYmax()/2);
        rc.Width=rand() % (_gl->getXmax()-rc.X);
        rc.Height=rand() % (_gl->getYmax()-rc.Y);

        _gl->setForeground(rand());
        _gl->drawRectangle(rc);

        if(i % 1000 ==0)
          _gl->clearScreen();
      }
    }
开发者ID:ADTL,项目名称:stm32plus,代码行数:34,代码来源:r61523_f051.cpp

示例3: rectTest

    void rectTest() {

      Rectangle rc;
      uint32_t start;

      prompt("Rectangle test");

      for(start=MillisecondTimer::millis();MillisecondTimer::millis()-start<5000;) {

        rc.X=(rand() % _gl->getXmax()/2);
        rc.Y=(rand() % _gl->getXmax()/2);
        rc.Width=rand() % (_gl->getXmax()-rc.X);
        rc.Height=rand() % (_gl->getYmax()-rc.Y);

        if(rc.Width>0 && rc.Height>0) {
          _gl->setForeground(rand());
          _gl->fillRectangle(rc);
        }
      }

      _gl->clearScreen();

      for(start=MillisecondTimer::millis();MillisecondTimer::millis()-start<5000;) {

        rc.X=(rand() % _gl->getXmax()/2);
        rc.Y=(rand() % _gl->getXmax()/2);
        rc.Width=rand() % (_gl->getXmax()-rc.X);
        rc.Height=rand() % (_gl->getYmax()-rc.Y);

        _gl->setForeground(rand());
        _gl->drawRectangle(rc);
      }
    }
开发者ID:ADTL,项目名称:stm32plus,代码行数:33,代码来源:st7783.cpp

示例4: rectTest

    void rectTest() {

      int i;
      Rectangle rc;

      prompt("Rectangle test");

      for(i=0;i<1500;i++) {

        rc.X=(rand() % _gl->getXmax()/2);
        rc.Y=(rand() % _gl->getXmax()/2);
        rc.Width=rand() % (_gl->getXmax()-rc.X);
        rc.Height=rand() % (_gl->getYmax()-rc.Y);

        _gl->setForeground(rand());
        _gl->fillRectangle(rc);
      }

      _gl->clearScreen();

      for(i=0;i<10000;i++) {

        rc.X=(rand() % _gl->getXmax()/2);
        rc.Y=(rand() % _gl->getXmax()/2);
        rc.Width=rand() % (_gl->getXmax()-rc.X);
        rc.Height=rand() % (_gl->getYmax()-rc.Y);

        _gl->setForeground(rand());
        _gl->drawRectangle(rc);

        if(i % 1000 ==0)
          _gl->clearScreen();
      }
    }
开发者ID:0x00f,项目名称:stm32plus,代码行数:34,代码来源:hx8347a.cpp

示例5: ellipseTest

    void ellipseTest() {

      int16_t i;
      Point p;
      Size s;
      uint32_t start;

      prompt("Ellipse test");
      _gl->setBackground(0);

      for(start=MillisecondTimer::millis();MillisecondTimer::millis()-start<5000;) {

        p.X=_gl->getXmax()/4+(rand() % (_gl->getXmax()/2));
        p.Y=_gl->getYmax()/4+(rand() % (_gl->getYmax()/2));

        if(p.X<_gl->getXmax()/2)
          s.Width=rand() % p.X;
        else
          s.Width=rand() % (_gl->getXmax()-p.X);

        if(p.Y<_gl->getYmax()/2)
          s.Height=rand() % p.Y;
        else
          s.Height=rand() % (_gl->getYmax()-p.Y);

        _gl->setForeground(rand());
        _gl->fillEllipse(p,s);
      }

      _gl->clearScreen();

      for(i=0,start=MillisecondTimer::millis();MillisecondTimer::millis()-start<5000;i++) {

        p.X=_gl->getXmax()/4+(rand() % (_gl->getXmax()/2));
        p.Y=_gl->getYmax()/4+(rand() % (_gl->getYmax()/2));

        if(p.X<_gl->getXmax()/2)
          s.Width=rand() % p.X;
        else
          s.Width=rand() % (_gl->getXmax()-p.X);

        if(p.Y<_gl->getYmax()/2)
          s.Height=rand() % p.Y;
        else
          s.Height=rand() % (_gl->getYmax()-p.Y);

        if(s.Height>0 && s.Width>0 && p.X+s.Width<_gl->getXmax() && p.Y+s.Height<_gl->getYmax()) {
          _gl->setForeground(rand());
          _gl->drawEllipse(p,s);
        }

        if(i % 1000==0)
          _gl->clearScreen();
      }
    }
开发者ID:ADTL,项目名称:stm32plus,代码行数:55,代码来源:st7783.cpp

示例6: doGradientFills

    void doGradientFills(Direction dir) {

      Rectangle rc;
      uint16_t i;
      static uint32_t colours[7]={
        ColourNames::RED,
        ColourNames::GREEN,
        ColourNames::BLUE,
        ColourNames::CYAN,
        ColourNames::MAGENTA,
        ColourNames::YELLOW,
        ColourNames::WHITE,
      };


      rc.Width=_gl->getXmax()+1;
      rc.Height=(_gl->getYmax()+1)/2;

      for(i=0;i<sizeof(colours)/sizeof(colours[0]);i++) {

        rc.X=0;
        rc.Y=0;

        _gl->gradientFillRectangle(rc,dir,ColourNames::BLACK,colours[i]);
        rc.Y=rc.Height;
        _gl->gradientFillRectangle(rc,dir,colours[i],ColourNames::BLACK);

        MillisecondTimer::delay(1000);
      }
    }
开发者ID:ADTL,项目名称:stm32plus,代码行数:30,代码来源:r61523_f051.cpp

示例7: textTest

    void textTest() {

      const char *str="The quick brown fox";
      Size size;
      Point p;
      uint32_t i,start;

      prompt("Stream operators test");

      *_gl << Point::Origin << "Let's see PI:";

      for(i=0;i<=7;i++)
        *_gl << Point(0,(1+i)*_font.getHeight()) << DoublePrecision(3.1415926535,i);

      MillisecondTimer::delay(5000);

      prompt("Opaque text test");

      size=_gl->measureString(_font,str);

      for(i=0,start=MillisecondTimer::millis();MillisecondTimer::millis()-start<5000;i++) {

        p.X=rand() % (_gl->getXmax()-size.Width);
        p.Y=rand() % (_gl->getYmax()-size.Height);

        _gl->setForeground(rand());
        _gl->writeString(p,_font,str);
      }
    }
开发者ID:ADTL,项目名称:stm32plus,代码行数:29,代码来源:r61523_f051.cpp

示例8: lineTest

    void lineTest() {

      Point p1,p2;
      uint32_t start;

      prompt("Line test");

      for(start=MillisecondTimer::millis();MillisecondTimer::millis()-start<5000;) {
        p1.X=rand() % _gl->getXmax();
        p1.Y=rand() % _gl->getYmax();
        p2.X=rand() % _gl->getXmax();
        p2.Y=rand() % _gl->getYmax();

        _gl->setForeground(rand());
        _gl->drawLine(p1,p2);
      }
    }
开发者ID:ADTL,项目名称:stm32plus,代码行数:17,代码来源:st7783.cpp

示例9: lineTest

    void lineTest() {

      Point p1,p2;
      int i;

      prompt("Line test");

      for(i=0;i<5000;i++) {
        p1.X=rand() % _gl->getXmax();
        p1.Y=rand() % _gl->getYmax();
        p2.X=rand() % _gl->getXmax();
        p2.Y=rand() % _gl->getYmax();

        _gl->setForeground(rand());
        _gl->drawLine(p1,p2);
      }
    }
开发者ID:0x00f,项目名称:stm32plus,代码行数:17,代码来源:hx8347a.cpp

示例10: scrollTest

    void scrollTest() {

      int32_t i,j,numRows;
      Point p;

      prompt("Hardware scrolling test");

      _gl->setForeground(0xffffff);
      _gl->setBackground(0);
      _gl->clearScreen();

      numRows=((_gl->getYmax()+1)/_font->getHeight())/3;

      p.X=0;

      for(i=0;i<numRows;i++) {

        p.Y=(numRows+i)*_font->getHeight();
        *_gl << p << "Test row " << i;
      }

      for(j=0;j<15;j++) {

        numRows=(_gl->getYmax()+1)/4;

        for(i=0;i<numRows;i++) {
          _gl->setScrollPosition(i);
          MillisecondTimer::delay(5);
        }

        for(i=0;i<numRows;i++) {
          _gl->setScrollPosition(numRows-i);
          MillisecondTimer::delay(5);
        }
      }

      _gl->setScrollPosition(0);
    }
开发者ID:0x00f,项目名称:stm32plus,代码行数:38,代码来源:hx8347a.cpp

示例11: lineTest

    void lineTest() {

      Point p1,p2;
      uint32_t i,start;

      prompt("Line test");

      for(i=0,start=MillisecondTimer::millis();MillisecondTimer::millis()-start<5000;i++) {

        p1.X=rand() % _gl->getXmax();
        p1.Y=rand() % _gl->getYmax();
        p2.X=rand() % _gl->getXmax();
        p2.Y=rand() % _gl->getYmax();

        _gl->setForeground(rand());
        _gl->drawLine(p1,p2);
      }

      _gl->setForeground(ColourNames::WHITE);
      _gl->clearScreen();
      *_gl << Point::Origin << i << " lines in 5 seconds";
      MillisecondTimer::delay(3000);
    }
开发者ID:ADTL,项目名称:stm32plus,代码行数:23,代码来源:r61523_f051.cpp

示例12: textTest

    void textTest() {

      int i;
      const char *str="The quick brown fox";
      Size size;
      Point p;
      uint32_t start,before,elapsed,chars;

      prompt("Stream operators test");

      *_gl << Point::Origin << "Let's see PI:";

      for(i=0;i<=7;i++)
        *_gl << Point(0,(1+i)*_font->getHeight()) << DoublePrecision(3.1415926535,i);

      MillisecondTimer::delay(5000);

      prompt("Opaque text test");

      size=_gl->measureString(*_font,str);

      before=MillisecondTimer::millis();
      chars=0;

      for(start=MillisecondTimer::millis();MillisecondTimer::millis()-start<5000;) {

        p.X=rand() % (_gl->getXmax()-size.Width);
        p.Y=rand() % (_gl->getYmax()-size.Height);

        _gl->setForeground(rand());
        _gl->writeString(p,*_font,str);

        chars+=19;
      }

      elapsed=MillisecondTimer::millis()-before;

      _gl->clearScreen();
      _gl->setForeground(ColourNames::WHITE);
      *_gl << Point::Origin << (chars*1000/elapsed)  << " characters/sec";

      MillisecondTimer::delay(3000);
    }
开发者ID:ADTL,项目名称:stm32plus,代码行数:43,代码来源:st7783.cpp


注:本文中的LcdPanel::getYmax方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。