# @types/svg-path-bounding-box

> TypeScript definitions for svg-path-bounding-box

Latest version **1.0.2** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/svg-path-bounding-box
pnpm add @types/svg-path-bounding-box
yarn add @types/svg-path-bounding-box
bun add @types/svg-path-bounding-box
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-11-07 |
| First published | 2018-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51439 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/svg-path-bounding-box
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/svg-path-bounding-box
- npm.io page: https://npm.io/package/@types/svg-path-bounding-box

## Recent versions

- 1.0.2 (latest) — 2023-11-07
- 1.0.0 (ts2.0) — 2018-04-09
- 1.0.1 — 2023-10-18

## README

# Installation
> `npm install --save @types/svg-path-bounding-box`

# Summary
This package contains type definitions for svg-path-bounding-box (https://github.com/icons8/svg-path-bounding-box).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/svg-path-bounding-box.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/svg-path-bounding-box/index.d.ts)
````ts
export = svgPathBoundingBox;

declare function svgPathBoundingBox(
    path: string,
): svgPathBoundingBox.BoundingBoxView;

declare namespace svgPathBoundingBox {
    /**
     * pass in initial points if you want
     * @see https://github.com/gabelerner/canvg/blob/860e418aca67b9a41e858a223d74d375793ec364/canvg.js#L449
     */
    class BoundingBox {
        x1: number;
        y1: number;
        x2: number;
        y2: number;

        constructor(x1: number, y1: number, x2: number, y2: number);

        width(): number;

        height(): number;

        addPoint(x: number, y: number): void;

        addX(x: number): void;

        addY(y: number): void;

        addQuadraticCurve(
            p0x: number,
            p0y: number,
            p1x: number,
            p1y: number,
            p2x: number,
            p2y: number,
        ): void;

        /** @see http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html */
        addBezierCurve(
            p0x: number,
            p0y: number,
            p1x: number,
            p1y: number,
            p2x: number,
            p2y: number,
            p3x: number,
            p3y: number,
        ): void;
    }

    class BoundingBoxView {
        x1: number;
        y1: number;
        x2: number;
        y2: number;
        minX: number;
        minY: number;
        maxX: number;
        maxY: number;
        width: number;
        height: number;

        constructor(boundingBox: BoundingBox);

        round(precision?: number): this;

        scale(scale?: number): this;

        toString(): string;
    }

    class Path {
        d: string;

        constructor(d: string);

        getBoundingBox(): BoundingBoxView;
    }
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: none

# Credits
These definitions were written by [Tiger Oakes](https://github.com/NotWoods).

---
_Source: https://npm.io/package/@types/svg-path-bounding-box · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
