Contents

Images

Learn how to use images

Images in many popular formats can be drawn in the window. To draw an image in the window, use the following, providing the image file path:

Image.new('star.png')

Here are all the possible instance attributes:

Image.new(
  'star.png',
  x: 400, y: 200,
  width: 50, height: 25,
  color: [1.0, 0.5, 0.2, 1.0],
  rotate: 90,
  z: 10
)

Continue to the next topic ▸


✏️ Suggest an edit to this page