feat: 绘制基础类重构

This commit is contained in:
R524809
2026-04-10 15:06:11 +08:00
parent a911da6181
commit e74fd3709c
17 changed files with 1091 additions and 278 deletions
+14 -6
View File
@@ -1,3 +1,15 @@
/**
* 找字涂色服务
* 根据模板类型绘制到Canvas
*
* 支持的模板类型:
* - grid:网格模板
* - find:找字模板
*
* 支持的绘制服务:
* - TextDrawService:文字涂色服务
* - FindWordDrawService:找字涂色服务
*/
import { BaseDrawService } from '../core/draw/baseDraw';
import { POSITION_TEMPLATES } from './findWordTemplate';
@@ -85,16 +97,12 @@ class FindWordDrawService extends BaseDrawService {
this.clear();
this.setPaper();
// 绘制Header
if (this.headerType !== 'minimal') {
await this.drawHeader();
} else {
this.drawMiniHeader();
}
await this.drawHeader();
// 找字模板没有 drawLegend 部分
this.drawDivider();
this.drawContent();
await this.drawPrintFooter();
}
drawContent() {