Glimmr Canvas-Based Drawing

version 2/101030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter - Offset calculation

    Offset calculation of something is an activity.

    Last for offset calculation of a graphics g-window (called the window) (this is the default offset calculation rule):
        let panel be the associated canvas of the window;
        now the x-offset of the window is (the width of the window minus the scaled width of panel) divided by 2;
        now the y-offset of the window is (the height of the window minus the scaled height of panel) divided by 2;
        #if utilizing Glimmr debugging;
        say "[>console][CBD][i][window][/i] x offset set at [x-offset of the window]; y offset set at [y-offset of the window].[<]";
        #end if;