feat:增加图片插入
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
export interface IDrawOption {
|
||||
curIndex?: number;
|
||||
isSetCursor?: boolean
|
||||
isSetCursor?: boolean;
|
||||
isSubmitHistory?: boolean;
|
||||
}
|
||||
|
||||
export interface IDrawImagePayload {
|
||||
width: number;
|
||||
height: number;
|
||||
value: string;
|
||||
}
|
||||
@@ -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[];
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user