Chapter 5. Graphics – Canvas and Instructions

In this chapter, we will cover:

  • Separating with the screen manager
  • Using drawing instructions
  • Using context instructions
  • Working with manipulating instructions
  • Rotating, translating, and scaling the canvas
  • Modifying with multitouching
  • Storing and retrieving the coordinate space context
  • Introducing animations

Introduction

Graphics are an essential element in the Kivy philosophy and this is why each widget has graphical properties (even our app root widget). Canvas is used to represent the widget's graphics that you can see both as an unlimited drawing board and as a set of drawing instructions. We have two kinds of instructions, namely, vertex and context. The context instructions are not drawing anything, but ...

Get Kivy Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.