Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Kivy - Interactive Applications and Games in Python

You're reading from  Kivy - Interactive Applications and Games in Python

Product type Book
Published in Jun 2015
Publisher
ISBN-13 9781785286926
Pages 206 pages
Edition 1st Edition
Languages
Author (1):
Roberto Ulloa Roberto Ulloa
Profile icon Roberto Ulloa

Table of Contents (13) Chapters

Kivy – Interactive Applications and Games in Python Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. GUI Basics – Building an Interface 2. Graphics – the Canvas 3. Widget Events – Binding Actions 4. Improving the User Experience 5. Invaders Revenge – an Interactive Multi-touch Game 6. Kivy Player – a TED Video Streamer Index

Understanding the canvas


Before studying the examples of this chapter, it is important to recapitulate the following particularities related to the graphics display:

  • The coordinate space refers to the place in which we draw, which is not restricted to the windows size

  • A Canvas object is a set of instructions to draw in the coordinate space, not the place we draw in

  • All Widget objects contain their own Canvas (canvases, which we will see later) but all of them share the same coordinate space, the one in the App object.

For example, if we add a rotation instruction to a specific Canvas instance (for example, the canvas of a button), then this will also affect all the subsequent graphics instructions that are going to display graphics in the coordinate space. It doesn't matter if the graphics belong to canvases of different widgets; they all share the same coordinate space.

Therefore, we need to learn techniques to leave the coordinate space context in its original state after modifying it with...

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 $15.99/month. Cancel anytime}