# Glimmr Drawing Commands

## version 2/101030 by Erik Temple

**Section - Polychrome bitmap with background color**

To drpolybitmap in (WIN - a g-window) at (X1 - a number) by/x (Y1 - a number) using (BIT_MAP - a list of lists of numbers) with dot/-- size (WGT - a number) pixel/pixels/px/-- and background (bkgd - a number):

let row be Y1;

let column be X1;

let the bit-height be the number of entries of BIT_MAP;

let WDT be the number of entries in entry 1 of BIT_MAP;

dimrectdraw (BKGD) in (WIN) at (column) by (row) with size (WDT * WGT) by (bit-height * WGT);

repeat with current-row running through BIT_MAP:

repeat with index running through current-row:

if index > -1:

dimrectdraw (index) in (WIN) at (column) by (row) with size (WGT) by (WGT);

increase column by WGT;

increase row by WGT;

now column is X1.

To draw/display a/-- polychrome bitmap in (WIN - a g-window) at (X1 - a number) by/x (Y1 - a number) using (BIT_MAP - a list of lists of numbers) with dot/-- size (WGT - a number) pixel/pixels/px/-- and background (bkgd - a number):

#if utilizing Glimmr debugging;

say "[>console][DC]Drawing polychrome bitmap in [i][win][/i] with upper left ([X1], [Y1]) and dot size [WGT] (bitmap is [number of entries of bit_map] long, with width [the number of entries in entry 1 of BIT_MAP]); background color [bkgd].[<]";

#end if;

drpolybitmap in (WIN) at (X1) by (Y1) using (BIT_MAP) with dot size (WGT) px and background (BKGD).

To draw/display a/-- polychrome bitmap in (WIN - a g-window) at (COORD1 - a list of numbers) using (BIT_MAP - a list of lists of numbers) with dot/-- size (WGT - 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 a polychrome bitmap in (WIN) at (X1) by (Y1) using (BIT_MAP) with dot size (WGT) px and background (BKGD).