Dot matrix APIs should only be called from display effects.
There are two key objects you should understand: pages and windows.
A display page is special RAM which holds the frame buffer that determines which pixels are turned on and off. Display memory cannot be accessed like ordinary memory, though; it does not have a fixed address.
A display window is an address that the CPU can use to read/write display memory – that is, it sees one of the display pages.
There can be more display pages than windows, so not all pages are accessible at all times. Through mapping calls, you decide which pages are mapped to which windows.
You must go through several steps for each frame you want to write. For each step, there are several APIs to choose from.
dmd_alloc_
mapdmd_alloc_low_high
Do not assume that the low and high windows are contiguous in memory.
dmd_dup_mapped
dmd_clean_page_
mapdmd_copy_page
dmd_flip_low_high
to swap
them temporarily.
font_render_string
font_render_string_center
font_render_string_right
bmp_draw
frame_draw
dmd_text_outline
This API should be used when rendering text onto a color image. Each '1' bit
in the mask corresponds to a pixel that should be made black in the final image,
so that the text stands out from the background image. See dmd_overlay_outline
below for a method to do this.
dmd_overlay
dmd_overlay_color
dmd_overlay_onto_color
dmd_overlay_outline
dmd_text_outline
.
This is a fairly slow call, as it is requires several AND and OR operations.
dmd_and_page
dmd_or_page
dmd_xor_page
dmd_show_
mapdmd_show_other
dmd_show2
Prior to showing the image, you can schedule a transition. You call
dmd_sched_transition
just before showing to say which transition should
be used.
Other APIs are listed below.
dmd_flip_low_high
dmd_rough_copy
dmd_rough_erase