The biggesst problem I see is that there is no way of

clearing a rectangle without using the selection.

clearcells(rect-list) would help.

putcells(cell-list, x0, y0, axx, axy, ayx, ayy) could

usefully have an eighth argument, mode: 0 for clear, 1

for set, 2 for xor.

setcell(x, y, state) could also be extended to

setcell(x, y, mode), using mode as above.

Memory usage is also a big problem. Using python's

array package may help. Unfortunately, python has only

one-dimensional arrays, so we have to give a width

(which should divide the array length.

toarray(array,width,x,y,mode) would put cells from the

pattern into the array according to mode;

fromarray(array,width,x,y,mode) would put cells from

the array into the pattern.

The array corresponds to the pattern cells

(x,y), (x+1,y), ..., (x+width-1,y),

(x,y+1), (x+1,y+1), ..., (x+width-1,y+1), ...

(x,y+k), (x+1,y+k), ..., (x+width-1,y+k)

where k = len(array)/width - 1 .

Here, mode is an integer from 0 to 15 as in Common Lisp

BOOLE:

0 0 1 1 source

0 1 0 1 dest

integer op

0 clear 0 0 0 0 dest result

1 and 0 0 0 1

2 andc2 0 0 1 0

3 move 0 0 1 1

4 andc1 0 1 0 0

5 nop 0 1 0 1

6 xor 0 1 1 0

7 or 0 1 1 1

8 nor 1 0 0 0

9 eqv 1 0 0 1

10 comp 1 0 1 0

11 orc2 1 0 1 1

12 movec1 1 1 0 0

13 orc1 1 1 0 1

14 nand 1 1 1 0

15 fill 1 1 1 1

I don't know c++, so I'm not going to implement this,

but it would greatly speed up a script I'm writing.

I assume I contribute scripts by attaching them to

comments like this one?

Dan Hoey