Glimmr Canvas-Based Drawing

version 2/101030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next

  • Section - Command for resizing the canvas to the window

    [This phrase should be used in a before scaling rule, e.g.:

        A before scaling rule for the graphics-window:
            resize the canvas of the graphics-window to the window;

    The main use of such a rule is if we want to procedurally place our g-elements, e.g. we want to distribute a number of images at even intervals across the window, regardless of what size the window is.]

    To resize the/-- canvas of (win - a g-window) to the/-- window:
        now the canvas-width of the associated canvas of win is the width of win;
        now the canvas-height of the associated canvas of win is the height of win;