You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Draw colors said that:
0x[1, 2, 3, 4] remap current palette colors. 4 colors but 5 variants. 0 - transparent. Other lookups is shifted by 1, for handle a transparent. 1 means a 0 palette index etc.
This all will be mapped onto framebuffer by lookup table.
0x2 same as 0x0002, this means that you replace a FILL color as 2 of pallete and 0 for stroke.
DRAW_COLORS holds 4 color slots. You can think of each hex digit as a color slot, starting from right (least significant digit). So setting DRAW_COLORS to 0x42 will set the 1st draw color to 2 (the 2nd palette color), and the 2nd draw color 4 (the 4th palette color). A zero digit in any color slot means transparency.
Docs show example which uses
0x42
But template uses
store<u16>(w4.DRAW_COLORS, 2)
for this.Will be great explain what
0x42
mean and how it created. For example:0x04 << 4 | 0x02
. Even better have some util function like:The text was updated successfully, but these errors were encountered: