本文整理汇总了C++中TFT::fillRect方法的典型用法代码示例。如果您正苦于以下问题:C++ TFT::fillRect方法的具体用法?C++ TFT::fillRect怎么用?C++ TFT::fillRect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TFT
的用法示例。
在下文中一共展示了TFT::fillRect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: drawPicture
void PadConfiguration::drawPicture()
{
if(_picture == nullptr)
{
drawMapping();
return;
}
uint8_t* pointer = _picture;
uint16_t current(0);
#define READ_8 current = *pointer; ++pointer;
#define READ_16 current = *((uint16_t*)pointer); ++pointer; ++pointer;
READ_16;
TFTscreen.fillScreen(current);
READ_8;
uint16_t numColors(current);
for(uint16_t currentColor = 0; currentColor < numColors; ++currentColor)
{
READ_16;
uint16_t color = current;
READ_16;
uint32_t numRects(current);
for(uint16_t currentRect = 0; currentRect < numRects; ++currentRect)
{
READ_8;
int16_t x(current);
READ_8;
int16_t y(current);
READ_8;
int16_t w(current);
READ_8;
int16_t h(current);
TFTscreen.fillRect(x, y, w, h, color);
}
READ_16;
uint16_t numVLines(current);
for(uint16_t currentVLine = 0; currentVLine < numVLines; ++currentVLine)
{
READ_8;
int16_t x(current);
READ_8;
int16_t y(current);
READ_8;
int16_t l(current);
TFTscreen.drawFastVLine(x, y, l, color);
}
READ_16;
uint16_t numHLines(current);
for(uint16_t currentHLine = 0; currentHLine < numHLines; ++currentHLine)
{
READ_8;
int16_t x(current);
READ_8;
int16_t y(current);
READ_8;
int16_t l(current);
TFTscreen.drawFastHLine(x, y, l, color);
}
READ_16;
uint16_t numPix(current);
for(uint16_t currentPix = 0; currentPix < numPix; ++currentPix)
{
READ_8;
int16_t x(current);
READ_8;
int16_t y(current);
TFTscreen.drawPixel(x, y, color);
}
}
#undef READ_8
#undef READ_16
}