Skip to content

Commit aeedddf

Browse files
authored
Refactor row buffer handling in class.ts
1 parent 262ebe4 commit aeedddf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

class.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ class polyview extends polybase {
419419
const rowBuf = pins.createBuffer(h);
420420

421421
for (let x = Math.max(0, minX | 0); x <= Math.min(w - 1, maxX | 0); x++) {
422-
fximgGetRows(fxpic, idx + x, rowBuf, h);
422+
this.getRows(idx + x, rowBuf);
423423

424424
// หา y range สำหรับ x นี้ (intersect กับ 3 ขอบ)
425425
let yStart = h;
@@ -457,7 +457,7 @@ class polyview extends polybase {
457457
const clipYStart = Math.max(minY, Math.ceil(yStart));
458458
const clipYEnd = Math.min(maxY, Math.floor(yEnd));
459459
for (let y = clipYStart; y <= clipYEnd; y++) if (rowBuf[y] !== color) rowBuf[y] = color;
460-
fximgSetRows(fxpic, idx + x, rowBuf, h);
460+
this.setRows(x, rowBuf);
461461
}
462462
}
463463
}

0 commit comments

Comments
 (0)