feat: 字母描红页样式开发基本完成
This commit is contained in:
+17
-3
@@ -1,4 +1,4 @@
|
||||
import { BaseDrawService } from '../../../service/baseDraw';
|
||||
import { BaseDrawService } from '../../../core/draw/baseDraw';
|
||||
import type {
|
||||
LetterTracingData,
|
||||
TracingRow,
|
||||
@@ -169,7 +169,13 @@ export default class LetterTracingDraw extends BaseDrawService {
|
||||
const rowH = Math.max(36, (rest - 8) / rows.length);
|
||||
const rowWidth = cw - M * 2;
|
||||
for (let r = 0; r < rows.length; r++) {
|
||||
this.drawTracingRow(rows[r], M, y + r * (rowH + 10), rowH, rowWidth);
|
||||
this.drawTracingRow(
|
||||
rows[r],
|
||||
M,
|
||||
y + r * (rowH + 10),
|
||||
rowH,
|
||||
rowWidth,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,7 +218,15 @@ export default class LetterTracingDraw extends BaseDrawService {
|
||||
if (idx >= chars.length) break;
|
||||
const cx = M + c * (cellW + 4);
|
||||
this.drawFourLines(cx, y, cellW, cellH);
|
||||
this.drawCharInCell(chars[idx], cx, y, cellW, cellH, 0.85, true);
|
||||
this.drawCharInCell(
|
||||
chars[idx],
|
||||
cx,
|
||||
y,
|
||||
cellW,
|
||||
cellH,
|
||||
0.85,
|
||||
true,
|
||||
);
|
||||
}
|
||||
y += cellH + 6;
|
||||
}
|
||||
Reference in New Issue
Block a user