File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -148,18 +148,20 @@ namespace user_interface_base {
148
148
return res
149
149
}
150
150
151
- // Simply get the row, slice off the required bytes:
151
+ // Buffer lies on a single row:
152
+ // Simply get the row then slice off the required bytes.
152
153
else {
153
154
const rowBuf = Buffer . create ( bitmap . width ) ;
155
+ bitmap . getRows ( startingRow , rowBuf ) ;
154
156
let res = Buffer . create ( chunkSize ) ;
155
157
156
158
// bitmap.getRows(startingRow, rowBuf);
157
159
// basic.showNumber(rowBuf.length)
158
160
// const res = rowBuf.slice(startIndex % width, chunkSize);
159
161
const start = startIndex % width ;
160
- const end = start + chunkSize ;
162
+ // const end = start + chunkSize;
161
163
for ( let i = 0 ; i < chunkSize ; i ++ ) {
162
- res [ i ] = rowBuf [ i + startIndex ] ;
164
+ res [ i ] = rowBuf [ i + start ] ;
163
165
}
164
166
return res
165
167
}
You can’t perform that action at this time.
0 commit comments