UNPKG

@visactor/vrender-core

Version:

```typescript import { xxx } from '@visactor/vrender-core'; ```

25 lines (24 loc) 864 B
import type { BackgroundPosition, BackgroundSizing, IGraphicAttribute, IGraphic } from '../graphic'; export type IRepeatType = 'no-repeat' | 'repeat'; export type ImageMode = BackgroundSizing; export type IImageAttribute = { width: number; height: number; maxWidth?: number; maxHeight?: number; imageMode?: ImageMode; imagePosition: BackgroundPosition; imageScale: number; imageOffsetX: number; imageOffsetY: number; repeatX: IRepeatType; repeatY: IRepeatType; image: string | HTMLImageElement | HTMLCanvasElement; cornerRadius: number | number[]; cornerType: 'round' | 'bevel'; }; export type IImageGraphicAttribute = Partial<IGraphicAttribute> & Partial<IImageAttribute>; export interface IImage extends IGraphic<IImageGraphicAttribute> { successCallback?: () => void; failCallback?: () => void; }