UNPKG

@visactor/vrender-core

Version:
25 lines (24 loc) 1.06 kB
import type { IPointLike } from '@visactor/vutils'; import type { IGraphicAttribute, IGraphic, IConnectedStyle } from '../graphic'; import type { ICurveType } from '../common'; import type { ISegPath2D } from '../curve'; export type IClipRangeByDimensionType = 'x' | 'y' | 'auto' | 'default'; export type ILineAttribute = { segments: ISegment[]; points: IPointLike[]; curveType: ICurveType; clipRange: number; clipRangeByDimension: IClipRangeByDimensionType; closePath: boolean; curveTension: number; }; export type ILineGraphicAttribute = Partial<IGraphicAttribute> & Partial<ILineAttribute> & Partial<IConnectedStyle>; export interface ILine extends IGraphic<ILineGraphicAttribute> { cache?: ISegPath2D | ISegPath2D[]; } type ISegmentStyle = Pick<IGraphicAttribute, 'stroke' | 'strokeOpacity' | 'lineDash' | 'lineDashOffset' | 'lineCap' | 'lineJoin' | 'lineWidth' | 'miterLimit'>; export interface ISegment extends Partial<ISegmentStyle>, Partial<IConnectedStyle> { points: IPointLike[]; simplify?: boolean; } export {};