Rotating, translating, and scaling the coordinate space

Rotate, Translate, and Scale are context instructions that are applied to the vertex instructions, which are displayed in the coordinate space. They could bring unexpected results if we forget that the coordinate space is shared among all widgets, and it occupies the size of the window (actually bigger than that because there is no restriction on the coordinates and we can draw outside the window). First, we are going to understand the behavior of this instruction in this section and, in the next section, we can analyze the problems they bring in a deeper way, and learn techniques to make things easier.

Let's start with the new drawing.kv code:

114. # File name: drawing.kv (Rotate, Translate ...

Get Kivy – Interactive Applications and Games in Python - Second Edition 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.