10000 docs/library: Fix framebuf monochrome 1-bit modes, swapping HLSB/HMSB. · boris93/micropython@88cbfd7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 88cbfd7

Browse files
peterhinchdpgeorge
authored andcommitted
docs/library: Fix framebuf monochrome 1-bit modes, swapping HLSB/HMSB.
This fix can be demonstrated by the following: b = bytearray(32) f = framebuf.FrameBuffer(b, 32, 8, framebuf.MONO_HLSB) f.pixel(0, 0, 1) print('MONO_HLSB', hex(b[0])) b = bytearray(32) f = framebuf.FrameBuffer(b, 32, 8, framebuf.MONO_HMSB) f.pixel(0, 0, 1) print('MONO_HMSB', hex(b[0])) Outcome: MONO_HLSB 0x80 MONO_HMSB 0x1
1 parent ce40abc commit 88cbfd7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/library/framebuf.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Constants
130130

131131
Monochrome (1-bit) color format
132132
This defines a mapping where the bits in a byte are horizontally mapped.
133-
Each byte occupies 8 horizontal pixels with bit 0 being the leftmost.
133+
Each byte occupies 8 horizontal pixels with bit 7 being the leftmost.
134134
Subsequent bytes appear at successive horizontal locations until the
135135
rightmost edge is reached. Further bytes are rendered on the next row, one
136136
pixel lower.
@@ -139,7 +139,7 @@ Constants
139139

140140
Monochrome (1-bit) color format
141141
This defines a mapping where the bits in a byte are horizontally mapped.
142-
Each byte occupies 8 horizontal pixels with bit 7 being the leftmost.
142+
Each byte occupies 8 horizontal pixels with bit 0 being the leftmost.
143143
Subsequent bytes appear at successive horizontal locations until the
144144
rightmost edge is reached. Further bytes are rendered on the next row, one
145145
pixel lower.

0 commit comments

Comments
 (0)
0