UNPKG

701 BTypeScriptView Raw
1import { PathStyleProps } from '../Path';
2declare type LineShape = {
3 x1: number;
4 y1: number;
5 x2: number;
6 y2: number;
7};
8declare type RectShape = {
9 x: number;
10 y: number;
11 width: number;
12 height: number;
13 r?: number | number[];
14};
15export declare function subPixelOptimizeLine(outputShape: Partial<LineShape>, inputShape: LineShape, style: Pick<PathStyleProps, 'lineWidth'>): LineShape;
16export declare function subPixelOptimizeRect(outputShape: Partial<RectShape>, inputShape: RectShape, style: Pick<PathStyleProps, 'lineWidth'>): RectShape;
17export declare function subPixelOptimize(position: number, lineWidth?: number, positiveOrNegative?: boolean): number;
18export {};