本文整理汇总了C++中TFT::point方法的典型用法代码示例。如果您正苦于以下问题:C++ TFT::point方法的具体用法?C++ TFT::point怎么用?C++ TFT::point使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TFT
的用法示例。
在下文中一共展示了TFT::point方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: clearPoint
// Clear (draw black) 9x9 square
void Board::clearPoint(int xPoint, int yPoint){
TFTscreen.stroke(0, 0, 0);
for(int i = -3; i <= 3; i++){
for(int j = -3; j <= 3; j++){
TFTscreen.point(xPoint + i, yPoint + j);
}
}
}
示例2: drawPellet
// Draw a 9x9 pellet
void Board::drawPellet(Pellet pellet){
TFTscreen.stroke(56, 3, 200);
for(int i = -3; i <= 3; i++){
for(int j = -3; j <= 3; j++){
TFTscreen.point(pellet.xPos + i, pellet.yPos + j);
}
}
TFTscreen.stroke(0,0,0);
}
示例3: drawPointFast
// Draws snake body as single point(1 pixel)
void Board::drawPointFast(uint8_t xPoint, uint8_t yPoint){
// Set new stroke
TFTscreen.stroke(rgbColour[0], rgbColour[1], rgbColour[2]);
// Draw 9x9 square
TFTscreen.point(xPoint, yPoint);
// Set new colors
updateColors();
}
示例4: drawPoint
// Draws a 9X9 point with (xPoint, yPoint) as center
void Board::drawPoint(uint8_t xPoint, uint8_t yPoint){
// set new stroke
TFTscreen.stroke(rgbColour[0], rgbColour[1], rgbColour[2]);
//Draw 9x9 square
for(int i = -3; i <= 3; i++){
for(int j = -3; j <= 3; j++){
TFTscreen.point(((int)xPoint) + i, ((int)yPoint) + j);
}
}
// Set new colors
updateColors();
}
示例5: drawPelletFast
// Draws pellet as only the middle pixel
void Board::drawPelletFast(Pellet pellet){
TFTscreen.stroke(56, 3, 200);
TFTscreen.point(pellet.xPos, pellet.yPos);
TFTscreen.stroke(0,0,0);
}
示例6: clearPointFast
// Clear (draw black) single point (1 pixel)
void Board::clearPointFast(int xPoint, int yPoint){
TFTscreen.stroke(0, 0, 0);
TFTscreen.point(xPoint, yPoint);
}