Top-rated recipes tagged "rotation" Code RecipesMetro Spinner for Tkinter (Python) 2017-04-10T21:14:36-07:00Miguel Martínez López <p style="color: grey"> Python recipe 580777 by <a href="/recipes/users/4189907/">Miguel Martínez López</a> (<a href="/recipes/tags/canvas/">canvas</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/pil/">pil</a>, <a href="/recipes/tags/rotation/">rotation</a>, <a href="/recipes/tags/spinner/">spinner</a>, <a href="/recipes/tags/tkinter/">tkinter</a>). </p> <p>I create a rotating image class <em>RotatingIcon</em> inspired and based on this code:</p> <p><a href="" rel="nofollow"></a></p> <p>Features:</p> <ul> <li>Methods to stop and start the animation</li> <li>The animation automically stops when the window is not mapped, and the animation continues when the window is mapped again</li> <li>Time setting to control the speed of the animation</li> <li>All the formats accepted for PIL could be used. XBM format is automatically converted to Tk Bitmap. The advantage of Bitmats is the possibility to change the color of the foreground.</li> </ul> <p>I added 6 different styles of spinners with different sizes.</p> <p>I used for the icon generation.</p> <p>For more metro widgets see here:</p> <p><a href="" rel="nofollow"></a></p>