english
version "1.0"
identify "xyz"
module bitmap
#: This module provides an interface to some stepper motors.
define bitmap #: A bitmap
record
columns_size unsigned #: Number of columns
rows vector[vector[unsigned]] #: The rows of the bitmap
rows_size unsigned #: Number of rows
generate allocate, erase, print
procedure create@bitmap
takes
columns_size unsigned
rows_size unsigned
returns bitmap
#: This procedure will create and return a new {bitmap} object
#, that contains {rows_size} rows and {columns_size} columns.
procedure fetch2@bitmap
takes
bitmap bitmap
x unsigned
y unsigned
returns logical
#: This procedure will return the bit at location ({x}, {y}) in {bitmap}.
procedure find@bitmap
takes
bitmap bitmap
x_start unsigned
y_start unsigned
search_value logical
returns unsigned, unsigned
#: This procedure will search {bitmap} for {search_value} starting at
#, ({x_start}, {y_start}) in ever expanding squares. The matching
#, (x, y) coordinate is returned. If no value is found, {x_start},
#, {y_start} is returned.
procedure store2@bitmap
takes
bitmap bitmap
x unsigned
y unsigned
value logical
returns_nothing
#: This procedure will set the bit at location ({x}, {y}) in {bitmap}
#, to {value}.