From ff9e6b32c64ffd02d3c36d9cce1cc8361f70eb9b Mon Sep 17 00:00:00 2001 From: javalang Date: Thu, 15 Nov 2018 18:57:26 +0100 Subject: [PATCH] Update readme.md --- examples/TFTShape/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/TFTShape/readme.md b/examples/TFTShape/readme.md index a46358e..2e91f4f 100644 --- a/examples/TFTShape/readme.md +++ b/examples/TFTShape/readme.md @@ -1,6 +1,6 @@ # TFTShape TFTShape is an extension to draw shape-based objects on screen. The target of this extension is to abstract low level primitives but with full use of the TFT_eSPI core functions (no setPixel operations). Shapes are graphical objects with the most common 2D functionality such as draw, fill, scale and rotate. Shapes consists of vertices which will be interpteted by the TFTShape class to form points, lines, polygons etc. Vertices can be user defined or they can be generated by various TFTShape builder functions. To give you an overview, here is a short example to see how to use this extension: -##Building an analog clock +## Building an analog clock ### clock-face To draw a clock face, only three lines of code will be needed. The basic idea is to define a 12-sided polygon and draw a small dot on the vertices of the polygon. Fortunately TFTShape has the functionality not only to draw the shape itself but it can take also an argument to draw another shape (at all vertices positions). So the code is very simple: create a shape used for the 5 minutes dots, create a shape for an invisible grid and finally draw this grid with a Shape as an argument: ```javascript @@ -15,4 +15,4 @@ And this is the result of this code: ![clock-face](images/screenshot_4571.png) ### hands To draw a realistic clock hand, which should not be a single line and the anchor should not be exactly on one end of the hand, we design here a pentagon and scale this in one direction to our needs. Furthermore, because all of the TFTShape builder functions generate symmetrical shapes with the anchor point at the center, we need to move this anchor point (pivot point) nearly to the end of the hand. - +![clock-face](images/screenshot_4552.png)![clock-face](images/screenshot_4560.png)![clock-face](images/screenshot_4551.png)![clock-face](images/screenshot_4547.png)