At My Fingertips

Documentation

Documentation

Function from library pytamaro

compose(foreground_graphicbackground_graphic)

composeforeground_graphicbackground_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_graphicgraphic in the foreground

background_graphicgraphic in the background

The resulting composed graphic
Code
show_graphic(compose(pin(top_right, rectangle(50, 50, blue)), pin(bottom_left, rectangle(100, 50, red))))
Output
Graphical output from execution result

Logo of PyTamaro

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

Privacy PolicyPlatform Version 4153f55 (Wed, 02 Apr 2025 06:58:19 GMT)