feat: 绘制基础类重构
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user