Glimmr Drawing Commands

version 2/101030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next

  • Section: Dimensioned rectangle

    There is a second type of rectangle, the "dimensioned rectangle". This is used when we prefer to specify the dimensions of the rectangle rather than its extent in the coordinate field. We supply only the origin coordinate (upper left corner); there is no need to provide an endpoint. This command corresponds to the I6 instruction glk_window_fill_rect.

        draw a rectangle <color> in <window> at <origin> with size <width> by <height>

    Long forms:

        draw a rectangle (color g-SkyBlue) in the graphics-window at {120, 12} with size 180 by 12.
        draw a rectangle (hex #87CEEB) in the graphics-window at 120 by 12 with size 180 by 12.

    Short form:

        rectangle {120, 12} size 180 x 12.