Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Kivy Blueprints

You're reading from   Kivy Blueprints Build your very own app-store-ready, multi-touch games and applications with Kivy!

Arrow left icon
Product type Paperback
Published in Jan 2015
Publisher Packt
ISBN-13 9781783987849
Length 282 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Setting the stage


Initially, the entire surface of our app is occupied by the root widget, in this case, that's the canvas the user can paint upon. We won't devote any screen space to the instruments' area until later.

As you probably know by now, the root widget is the outermost widget in the hierarchy. Every Kivy application has one, and it can be pretty much anything, depending on the desired behavior. As seen in Chapter 1, Building a Clock App, BoxLayout is a suitable root widget; it was sufficient as we had no additional requirements for it, and layouts are designed to work as containers for other controls.

In the case of a Paint app, we need its root widget to adhere to much more interesting requirements; the user should be able to draw lines, possibly utilizing multitouch functionality, if available. At the moment, Kivy has no built-in controls suitable for the task at hand, so we will need to create our own.

Building new Kivy widgets is simple. As soon as our class inherits from Kivy...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image