Sector.d.ts 625 B

1234567891011121314151617181920212223
  1. import Path, { PathProps } from '../Path';
  2. export declare class SectorShape {
  3. cx: number;
  4. cy: number;
  5. r0: number;
  6. r: number;
  7. startAngle: number;
  8. endAngle: number;
  9. clockwise: boolean;
  10. cornerRadius: number;
  11. innerCornerRadius: number;
  12. }
  13. export interface SectorProps extends PathProps {
  14. shape?: Partial<SectorShape>;
  15. }
  16. declare class Sector extends Path<SectorProps> {
  17. shape: SectorShape;
  18. constructor(opts?: SectorProps);
  19. getDefaultShape(): SectorShape;
  20. buildPath(ctx: CanvasRenderingContext2D, shape: SectorShape): void;
  21. isZeroArea(): boolean;
  22. }
  23. export default Sector;