Glimmr Canvas-Based Drawing

version 2/101030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Part - Graphic hyperlinking using tiled linked command arrays

    The tiled graphlink setting rules are an object-based rulebook.
    The tiled graphlink setting rules have outcomes exit (success - the default) and continue (no outcome).

    A tiled graphlink setting rule for an image-map (called the grid):
        let row be win-y of the grid;
        let column be win-x of the grid;
        repeat with current-row running through the linked command array of the grid:
            repeat with index running through current-row:
                unless index is "":
                    set a graphlink in current window identified as (the grid) from (column) by (row) to (column + scaled tile-width of grid) by (row + scaled tile-height) as (index), ignoring redundant links;
                    #if utilizing the image-map graphlink preview option;
                    if graphlink preview color is not g-PlaceNullCol:
                        boxdraw (color graphlink preview color) in (current window) from (column) by (row) to (column + scaled tile-width of grid) by (row + scaled tile-height) with 1;
                    #end if;
                increase column by scaled tile-width of grid;
            increase row by scaled tile-height of the grid;
            now column is win-x of the grid;
        #if utilizing Glimmr debugging;
         say "[>console][CBD]Graphlinks set on [number of entries in the linked command array of the grid * number of entries in entry 1 of the linked command array of the grid] individual tiles for tileset image-map [i][grid][/i] in [i][current window][/i].[<]";
        #end if.