feat:增加图片插入

This commit is contained in:
黄云飞
2021-11-20 18:04:41 +08:00
parent b4553560af
commit 4160abfac8
24 changed files with 238 additions and 62 deletions
+7 -1
View File
@@ -1,5 +1,11 @@
export interface IDrawOption {
curIndex?: number;
isSetCursor?: boolean
isSetCursor?: boolean;
isSubmitHistory?: boolean;
}
export interface IDrawImagePayload {
width: number;
height: number;
value: string;
}
+10 -2
View File
@@ -1,5 +1,12 @@
import { ElementType } from "../dataset/enum/Element"
import { RowFlex } from "../dataset/enum/Row"
export interface IElementMetrics {
width: number;
boundingBoxAscent: number;
boundingBoxDescent: number;
}
export interface IElementStyle {
font?: string;
size?: number;
@@ -16,7 +23,8 @@ export interface IElementStyle {
}
export interface IElementBasic {
type?: 'TEXT' | 'IMAGE';
id?: string;
type?: ElementType;
value: string;
}
@@ -28,7 +36,7 @@ export interface IElementPosition {
rowNo: number;
ascent: number;
lineHeight: number;
metrics: TextMetrics;
metrics: IElementMetrics;
isLastLetter: boolean,
coordinate: {
leftTop: number[];
+2 -2
View File
@@ -1,8 +1,8 @@
import { RowFlex } from "../dataset/enum/Row"
import { IElement } from "./Element"
import { IElement, IElementMetrics } from "./Element"
export type IRowElement = IElement & {
metrics: TextMetrics
metrics: IElementMetrics
}
export interface IRow {