Documentation

Function defined in library pytamaro

rotate(angle, graphic)

rotateanglegraphic

Creates a new graphic by rotating counterclockwise the provided graphic around its pinning position by the given angle. A negative angle corresponds to a clockwise rotation.

angleangle of counterclockwise rotation, in degrees

graphicthe graphic to rotate

A new, rotated graphic
Code
show_graphic(rotate(15, text('PyTamaro', 'Fira Sans', 24, red)))
Output
Graphical output from execution result
Code
show_graphic(rotate(-30, text('PyTamaro', 'Fira Sans', 24, red)))
Output
Graphical output from execution result

PyTamaro logo

PyTamaro is a project created by the Lugano Computing Education Research Lab at the Software Institute of USI

Privacy Policy • Platform Version 7dd0569a (October 21, 2026 at 7:47:45 AM UTC)