subPixelOptimize.d.ts 701 B

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