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 they change as the result of the vertex instructions.
Instructions can also be arranged in two subsets according to the order in which they appear in the canvas. These subsets are the canvas.before
and the canvas.after
instruction groups. Their creation in our app depends on the user accesses.
The principal package used to work with graphics in Kivy is kivy.graphics
, which is compatible with OpenGL ES 2.0 and has many rendering optimizations.