本文整理汇总了C++中Adafruit_ILI9341::drawFastVLine方法的典型用法代码示例。如果您正苦于以下问题:C++ Adafruit_ILI9341::drawFastVLine方法的具体用法?C++ Adafruit_ILI9341::drawFastVLine怎么用?C++ Adafruit_ILI9341::drawFastVLine使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Adafruit_ILI9341
的用法示例。
在下文中一共展示了Adafruit_ILI9341::drawFastVLine方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testFastLines
unsigned long testFastLines(uint16_t color1, uint16_t color2) {
unsigned long start;
int x, y, w = tft.width(), h = tft.height();
tft.fillScreen(ILI9341_BLACK);
start = micros();
for (y = 0; y < h; y += 5) tft.drawFastHLine(0, y, w, color1);
for (x = 0; x < w; x += 5) tft.drawFastVLine(x, 0, h, color2);
return micros() - start;
}
示例2: draw
void Button::draw() {
if (_touching) {
tft.fillRect(_pos.x, _pos.y, _size.w, _size.h, touchColor);
} else {
tft.fillRect(_pos.x-1, _pos.y-1, _size.w, _size.h, bgColor);
// TODO: Better drop shadow
tft.drawFastVLine(_pos.x-1+_size.w, _pos.y-1, _size.h, ILI9341_BLACK);
tft.drawFastHLine(_pos.x-1, _pos.y-1+_size.h, _size.w, ILI9341_BLACK);
}
Label::draw();
}
示例3: drawChart
void Stat::drawChart() {
if (_redrawChart) {
_cur = 0;
tft.fillRect(_chart.x, _chart.y - 1 /* catch the top of the unit of the axis */,
_chartWidth, 32 /* to catch the bottom of the unit on the axis */,
ILI9341_BLACK);
tft.setCursor(_chart.x + 27 - ((int16_t) strlen(_labelText) * 6), _chart.y + 12+CURSOR_Y_SMALL);
tft.setTextColor(ILI9341_WHITE);
tft.setFont(&Inconsolata_g5pt7b);
tft.print(_labelText);
tft.setCursor(_chart.x + _chartWidth - 45, _chart.y+CURSOR_Y_SMALL);
tft.print(_max == INT_MIN ? 0 : _max);
if (_unitText) {
tft.setTextColor(_chartColor);
tft.setCursor(_chart.x + _chartWidth - 45, _chart.y + 12+CURSOR_Y_SMALL);
tft.print(_unitText);
tft.setTextColor(ILI9341_WHITE);
}
tft.setCursor(_chart.x + _chartWidth - 45, _chart.y + 24+CURSOR_Y_SMALL);
tft.print(_min == INT_MAX ? 0 : _min);
tft.setFont(&Inconsolata_g8pt7b);
_redrawChart = false;
tft.fillRect(_chart.x + 30, _chart.y, _chartWidth - 80, 30, tft.color565(10, 10, 10));
}
for ( ; _cur < _end; _cur++) {
if (invalidReadingi(_historical[_cur])) {
tft.drawFastVLine(_chart.x+30+_cur, _chart.y, 30, ILI9341_MAROON);
continue;
}
int norm = (int) map(_historical[_cur], _min, _max, 0, 29);
int x = _chart.x+30+_cur;
int y = _chart.y+29-norm;
tft.fillRect(x, y, 1, 1, _chartColor);
}
}