Small Basic Featured Article - How to Rotate a Shape Not from the Center
Published Feb 12 2019 02:41 PM 406 Views
Microsoft
First published on MSDN on Dec 12, 2013

Authored by Ed Price


Today's featured article is the Small Basic Guru gold medal winner for October!



Small Basic: How to Rotate a Shape Not from the Center


By Nonki Takahashi
December 8, 2013


This article shows how to rotate a shape not from it's center in Small Basic programming language.  Because Shapes.Rotate() rotates a shape from the center of the shape. This is a simple analog stop watch which have a second hand.  This second hand is a rectangle. This rectangle is rotated not from it's center. In line 24, this rectangle is rotated.  But after that...


Excerpt:


So, the most important part is from which point you should move the rectangle.  The following picture shows the rectangle before rotation.

If you'd like to rotate this rectangle from the rotation center (the red point), you should move this rectangle as following, using the green arrow.



Read the rest here:



Small Basic: How to Rotate a Shape Not from the Center



Special thanks to Nonki and for this great contribution!


- Ninja Ed

Version history
Last update:
‎Feb 12 2019 02:41 PM
Updated by: