From bd367bc33a8dad0be6d22a0fb1bb9c05ac745c6e Mon Sep 17 00:00:00 2001 From: LiHuashen <854410664@qq.com> Date: Wed, 13 Feb 2019 17:59:01 +0800 Subject: [PATCH] Update lcd.md --- docs/zh_CN/api/lcd.md | 74 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 62 insertions(+), 12 deletions(-) diff --git a/docs/zh_CN/api/lcd.md b/docs/zh_CN/api/lcd.md index f26e6f27..5d81a778 100644 --- a/docs/zh_CN/api/lcd.md +++ b/docs/zh_CN/api/lcd.md @@ -2,7 +2,13 @@ *屏幕像素为 320x240,以屏幕左上角为原点 (0,0)* -### fillScreen(uint16_t color); +### fillScreen() + +**函数原型:** + +fillScreen(uint16_t color); // for arduino + + **功能:以指定的颜色填充整个屏幕。** @@ -49,7 +55,13 @@ lcd.setRotation(90) * * * --> -### setTextColor(uint16_t color, uint16_t backgroundcolor); +### setTextColor() + +**函数原型:** + +setTextColor(uint16_t color, uint16_t backgroundcolor); // for arduino + + **功能:设置显示文本的前景颜色和背景颜色。** @@ -79,7 +91,13 @@ lcd.setTextColor(lcd.ORANGE, lcd.DARKCYAN) * * * -### setCursor(uint16_t x0, uint16_t y0); +### setCursor() + +**函数原型:** + +setCursor(uint16_t x0, uint16_t y0); // for arduino + + **功能:移动光标位置到 (x0, y0) 处。** @@ -102,7 +120,11 @@ lcd.drawPixel(22,22,lcd.RED) * * * -### drawPixel(int16_t x, int16_t y, uint16_t color); +### drawPixel() + +**函数原型:** + +drawPixel(int16_t x, int16_t y, uint16_t color); // for arduino **功能:在位置(x,y)处画点。** @@ -130,7 +152,11 @@ lcd.drawPixel(22,22,lcd.RED) * * * -### drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color); +### drawLine() + +**函数原型:** + +drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color); // for arduino **功能:以指定的颜色从点(x,y)到点(x1,y1)画直线。** @@ -158,7 +184,11 @@ lcd.drawLine(0,0,12,12,lcd.WHITE) * * * -### drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color); +### drawTriangle() + +**函数原型:** + +drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color); // for arduino **功能:以指定颜色画三角形,顶点分别为(x,y),(x1,y1)和(x2,y2)。** @@ -186,7 +216,11 @@ lcd.drawLine(0,0,12,12,lcd.WHITE) * * * -### fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color); +### fillTriangle() + +**函数原型:** + +fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color); // for arduino **功能:以指定颜色画填充形式的三角形,顶点分别为(x,y),(x1,y1)和(x2,y2)。** @@ -214,7 +248,11 @@ lcd.drawLine(0,0,12,12,lcd.WHITE) * * * -### drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color); +### drawRect() + +**函数原型:** + +drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color); // for arduino **功能:以指定颜色画矩形,其中矩形左上角坐标为(x,y),宽高分别为width和height。** @@ -245,7 +283,11 @@ lcd.drawLine(0,0,12,12,lcd.WHITE) * * * -### fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color); +### fillRect() + +**函数原型:** + +fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color); // for arduino **功能:以指定颜色画填充形式的矩形,其左上角坐标为(x,y),宽高分别为width和height。** @@ -276,7 +318,11 @@ lcd.drawLine(0,0,12,12,lcd.WHITE) * * * -### drawRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color); +### drawRoundRect() + +**函数原型:** + +drawRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color); // for arduino **功能:以指定颜色画圆角矩形,其中矩形左上角坐标为(x,y),宽高分别为width和height,圆角半径为radius。** @@ -307,7 +353,11 @@ lcd.drawLine(0,0,12,12,lcd.WHITE) * * * -### print(); +### print() + +**函数原型:** + +print(); // for arduino **功能:在屏幕的当前位置开始打印文本(字符串)text。** @@ -347,7 +397,7 @@ lcd.clear() -### Usage +### Usage {docsify-ignore} ```arduino #include