Basically I was asked to make an app like windows paint , I got a code that allows to draw shapes with buttons

but I don't know how to add text and also rotate and scale shapes or images .
...