Glimmr Drawing Commands

version 2/101030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Section: Image

    An image displays an external image file to the screen (PNG or JPEG format). These images must be declared as "figures" in Inform before they can be used (see Chapter 22 in Writing with Inform). We need to declare only the origin coordinate (upper left corner) of the image. The image will be displayed 1 for 1--that is, one pixel of the image will be assigned to one pixel on the screen.

    This command corresponds to the I6 instruction glk_image_draw.

        display image <figure name> in <window> at <origin>

    Long forms:

        display Figure of Frolf in the graphics-window at {0, 0}.
        display Figure of Frolf in the graphics-window at 0 by 0.

    Short form:

        image Figure of Frolf at {0, 0}.