How to apply Canvas Color to Widgets

How to apply Canvas Color to Widgets

Kivy_canvas

Test Environment

Fedora 31 with Kivy installed

What is Kivy Canvas –

– Every Kivy widget contains a canvas object
– Canvas object contains all the drwaing instructions that will render the graphical representation of the object
– There are two types of instructions that we can add to Canvas instances (ie. base classes VertexInstructions and ContextInstructions)
– Basic geometric shapes can be drawn using the vertex instructions (ie. straight and curve lines, ellipse, polygons)
– Coloring, Rotating, Translating and Scaling the coordinate space is done using context instructions
– Kivy provides three canvas instances canvas.before, canvas, canvas.after

In this video we will see how we can apply Canvas instructions to our Child Widgets. Also, we will see how canvas.before, canvas and canvas.after instructions effect the UI representation of the Widgets.

Hope you learning something in this video. Thank you for watching.