C API 1.9.1: How to use an LCDPattern-based LCDColor?

Just to be clear, LCDPattern needs to be declared as a literal- there is no API function to create it. LCDBitmap is the opposite- it must be created via the API and not declared as a literal. Is this correct?

yes this is correct. This is mainly because LCDBitmap had to deal with different size which mean different stride etc. LCDPattern is much simple just a 8 by 8 with a mask.

Is it generally acceptable to directly overwrite the data returned by getBitmapData() ?

yes that data is provided so that you can write into it. Same for playdate->graphics->getFrame() which returns the frame buffer and let render the way you want in there.

Also, the SDK/API are closed source, correct?

yes. But usually you can ask questions on the forum and the panic staff is pretty open discussing any question you have.

2 Likes