TFT.point()

名称

TFT.point()

説明

指定した座標に点を描く。最初の引数は水平位置、2番目の引数は垂直位置である。

書式

void Adafruit_GFX::point(int16_t x, int16_t y);

引数

x水平位置。
y垂直位置。

戻り値

なし。

使用例

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <SPI.h>
#include <TFT.h>            // Arduino TFT library

#define cs   10
#define dc   9
#define rst  8

TFT screen = TFT(cs, dc, rst);

void setup() {
  // initialize the screen
  screen.begin();

  // make the background black
  screen.background(0,0,0);

  // set the stroke color to white
  screen.fill(255,255,255);

  // draw a pixel in the screen's center
  screen.point(screen.width()/2, screen.height()/2);
}

void loop() {

}

オリジナルのページ

https://www.arduino.cc/reference/en/libraries/tft/point/

最終更新日

January 8, 2024

inserted by FC2 system