compose
(
foreground_graphic
,
background_graphic
)
Creates a new graphic by composing the two provided graphics. The first graphic is kept in the foreground, the second one in the background. The graphics are aligned by superimposing their pinning positions.
The pinning position used to compose becomes the pinning position of the resulting graphic.
foreground_graphic
graphic in the foreground
background_graphic
graphic in the background
show_graphic(compose(pin(top_right, rectangle(50, 50, blue)), pin(bottom_left, rectangle(100, 50, red))))
PyTamaro is a project created by the Lugano Computing Education Research Lab at the Software Institute of USI
Privacy Policy • Platform Version ede3c94 (Fri, 23 May 2025 14:43:18 GMT)