LOLWUT: version 6 initial output. May change a bit.

This commit is contained in:
antirez
2019-10-07 18:24:34 +02:00
parent f019f28e7b
commit c10889150e
4 changed files with 33 additions and 13 deletions

View File

@ -90,12 +90,12 @@ void lolwutCommand(client *c) {
* canvas implementation that can be reused. */
/* Allocate and return a new canvas of the specified size. */
lwCanvas *lwCreateCanvas(int width, int height) {
lwCanvas *lwCreateCanvas(int width, int height, int bgcolor) {
lwCanvas *canvas = zmalloc(sizeof(*canvas));
canvas->width = width;
canvas->height = height;
canvas->pixels = zmalloc(width*height);
memset(canvas->pixels,0,width*height);
memset(canvas->pixels,bgcolor,width*height);
return canvas;
}