Glimmr Drawing Commands

version 2/101030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Section - Long forms of figure image-map (background color)

    To draw/display an/-- image-map in (WIN - a g-window) at (X1 - a number) by/x (Y1 - a number) using (IMG_MAP - a list of lists of figure names) with tile-size (W - a number) by/x (H - a number) pixel/pixels/px/-- and background (BKGD - a number):
        let total-height be the number of entries of IMG_MAP;
        let WDT be the the number of entries in entry 1 of IMG_MAP;
        #if utilizing Glimmr debugging;
        say "[>console][DC]Image-map drawn at screen coordinates ([X1], [Y1]) of [WIN] using the list of figure names provided, interpreted as a grid [WDT] tiles wide and [total-height] tiles high. Tile size used: [W] by [H] pixels. Background color [BKGD].[<]";
        #end if;
        rectdraw (BKGD) in (WIN) from (X1) by (Y1) to (WDT * W) by (total-height * H);
        drimagemap in (WIN) at (X1) by (Y1) using (IMG_MAP) with tile-size (W) by (H).

    To draw/display an/-- image-map in (WIN - a g-window) at (COORD1 - a list of numbers) using (IMG_MAP - a list of lists of figure names) with tile-size (W - a number) by/x (H - a number) pixel/pixels/px/-- and background (BKGD - a number):
        let X1 be entry 1 of coord1;
        let Y1 be entry 2 of coord1;
        display an image-map in (WIN) at (X1) by (Y1) using (IMG_MAP) with tile-size (W) by (H).