Skip to content

Custom Displayables#

Making Silhouettes#

It is possible to turn any valid image that already exists into a silhouette via the create_silhouette method, which looks like this:

1
create_silhouette("<name of image>", r=0, g=0, b=0, a=1)
1
2
3
4
5
# Create a black silhouette (default)
image john_silhouette = create_silhouette("john a_0")

# Create a white silhouette
image john_silhouette = create_silhouette("john a_0", 1, 1, 1)

In addition to specifying the image to turn into a silhouette you can also optionally add four number values which are one part of an RGBA color (Red, Green, Blue, Alpha/Opacity) each. The method will use this color to fill the silhouette. The values range from 0 (black) to 1 (white).