From ec992ff73563f7ea46821b31bf1612ccf8266210 Mon Sep 17 00:00:00 2001 From: zhouzaihang Date: Thu, 1 Jul 2021 03:53:20 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8DMath=E5=BA=93=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=96=87=E6=A1=A3=E9=83=A8=E5=88=86=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- math/README.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/math/README.md b/math/README.md index 64657c2..b863bf9 100644 --- a/math/README.md +++ b/math/README.md @@ -114,76 +114,76 @@ sin sqrt tan trunc 若 `x` 为有限的,则返回 `True` 。 -- `mathisinf`(*x*) +- `math.isinf`(*x*) 若 `x` 为无限,则返回 `True` 。 -- `mathisnan`(*x*) +- `math.isnan`(*x*) 若 `x` 非数字,则返回 `True` 。 -- `mathldexp`(*x*, *exp*) +- `math.ldexp`(*x*, *exp*) 返回 `x * (2**exp)`. -- `mathlgamma`(*x*) +- `math.lgamma`(*x*) 返回 `x` 的伽玛函数的自然对数。 -- `mathlog`(*x*) +- `math.log`(*x*) 返回 `x` 的自然对数。 -- `mathlog10`(*x*) +- `math.log10`(*x*) 返回 `x` 以10为底的对数。 -- `mathlog2`(*x*) +- `math.log2`(*x*) 返回 `x` 以2为底的对数。 -- `mathmodf`(*x*) +- `math.modf`(*x*) 返回包含两个浮点值的元组,即x的分数和积分部分。两个返回值都与 `x` 有同样标记。 -- `mathpow`(*x*, *y*) +- `math.pow`(*x*, *y*) 将 `x` 返回 `y` 的幂。 -- `mathradians`(*x*) +- `math.radians`(*x*) 返回度数 `x` 的弧度。 -- `mathsin`(*x*) +- `math.sin`(*x*) 返回 `x` 的正弦函数。 -- `mathsinh`(*x*) +- `math.sinh`(*x*) 返回的 `x` 双曲正弦函数。 -- `mathsqrt`(*x*) +- `math.sqrt`(*x*) 返回 `x` 的平方根. -- `mathtan`(*x*) +- `math.tan`(*x*) 返回 `x` 的正切函数。 -- `mathtanh`(*x*) +- `math.tanh`(*x*) 返回 `x` 的双曲正切函数。 -- `mathtrunc`(*x*) +- `math.trunc`(*x*) 截尾函数,返回 `x` 的整数部分。 ### 常量 -- `mathe` +- `math.e` 自然对数的底。 -- `mathpi` +- `math.pi` 一个圆的周长与其直径的比值。 \ No newline at end of file -- Gitee From a0927fa0c7de7e6845ec2af386d665304835900f Mon Sep 17 00:00:00 2001 From: zhouzaihang Date: Thu, 1 Jul 2021 04:03:56 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B1=8F=E5=B9=95?= =?UTF-8?q?=E7=BC=96=E5=86=99=E5=AD=97=E7=AC=A6=E4=B8=B2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- st7789/README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/st7789/README.md b/st7789/README.md index 256dffa..d909cd6 100644 --- a/st7789/README.md +++ b/st7789/README.md @@ -58,7 +58,19 @@ display.draw_string(50, 230, "Powered by BlackWalnuut Labs.") 直接复制 `bytes()` 或 `bytearray()` 的内容到屏幕内部缓冲区 -模块其他颜色定义:`BLACK`, `BLUE`, `RED`, `GREEN`, `CYAN`, `MAGENTA`, `YELLOW` 和 `WHITE` + +- `ST7789.draw_string(x, y, str, color=ST7789.WHITE, bg=ST7789.WHITE, size=1, vertical=False, rotate=ST7789.ROTATE_0)` + + 从指定带点 (x, y) 绘制字符串。 + - color: 指定字符串字体颜色 + - bg: 字符串背景颜色,当color和bg相同时,背景色不生效 + - size:字符串字体大小,必须为正整数 + - vertica:启用竖直排列 + - rorate:宣传角度,仅支持 `ROTATE_0`, `ROTATE_90`, `ROTATE_180`, `ROTATE_270` + +模块其他旋转角度定义:`ST7789.ROTATE_0`, `ST7789.ROTATE_90`, `ST7789.ROTATE_180`, `ST7789.ROTATE_270` + +模块其他颜色定义:`ST7789.BLACK`, `ST7789.BLUE`, `ST7789.RED`, `ST7789.GREEN`, `ST7789.CYAN`, `ST7789.MAGENTA`, `YELLOW` 和 `ST7789.WHITE` ## 模块其他方法 ---------------- -- Gitee