Update readme.md

This commit is contained in:
javalang 2018-11-15 19:46:28 +01:00 committed by GitHub
parent 591b939151
commit 490b34c2b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ Here you can see the phases of building a clock hand: source shape, resize shape
hand.setScale(.08,.8); //scale down the width to .08 and also shorten the hand with a facor of .8 hand.setScale(.08,.8); //scale down the width to .08 and also shorten the hand with a facor of .8
hand.setPivot(0,pivy); //set the pivot point hand.setPivot(0,pivy); //set the pivot point
``` ```
Now it's time to rotate the hand to the desired position. Lets assume, we want to show the hour hand for 5:40:05, we have to rotate about 170 degrees. After then we can draw the hour hand with one of the drawing method of TFTShape. Now it's time to rotate the hand to the desired position. Lets assume, we want to show the hour hand for 5:40:05, we have to rotate about 170 degrees. After then we can draw the hour hand with one of the drawing methods of TFTShape.
```javascript ```javascript
hand.setRotation(170); //set the rotation to 170 degrees hand.setRotation(170); //set the rotation to 170 degrees
hand.fill(&tft,120,160-pivy,TFT_GREY); //draw an fill the hand. hand.fill(&tft,120,160-pivy,TFT_GREY); //draw an fill the hand.