PHPackages                             intelogie/pathseg - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. intelogie/pathseg

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

intelogie/pathseg
=================

0124JavaScript

Since Nov 14Pushed 9y ago1 watchersCompare

[ Source](https://github.com/INTELOGIE/pathseg)[ Packagist](https://packagist.org/packages/intelogie/pathseg)[ RSS](/packages/intelogie-pathseg/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

SVGPathSeg polyfill
===================

[](#svgpathseg-polyfill)

This is a drop-in replacement for the SVGPathSeg and SVGPathSegList APIs that were removed from SVG2 (). Existing code that uses the SVGPathSeg or SVGPathSegList APIs can use this polyfill to keep working. This polyfill is based on the exact code and tests that were removed from Chromium 47.

The SVGPathSeg API was difficult to use and has been removed from the SVG spec in favor of a new, awesomer API in the Paths module (). All new development should use the SVG Path Data API. There's a polyfill ([path-data-polyfill.js](https://github.com/jarek-foksa/path-data-polyfill.js)) for browsers that do not yet support the new API.

Implementation status
---------------------

[](#implementation-status)

Now passing all SVGPathSeg tests from the Chromium repository.

Now used by [svg-edit](https://github.com/SVG-Edit/svgedit) and passes all svg-edit path tests.

Using pathseg.js
----------------

[](#using-pathsegjs)

Just add pathseg.js to your server and drop this in your html or svg files:

```

```

Example API usage
-----------------

[](#example-api-usage)

```
var path = document.createElementNS("http://www.w3.org/2000/svg", "path");
var moveToSeg = path.createSVGPathSegMovetoRel(10, 10);
var lineToSeg = path.createSVGPathSegLinetoRel(100, 100);
path.pathSegList.appendItem(moveToSeg);
path.pathSegList.appendItem(lineToSeg);
console.log(path.getAttribute('d')); // m 10 10 l 100 100
moveToSeg.x += 200;
moveToSeg.y += 200;
console.log(path.getAttribute('d')); // m 210 210 l 100 100

```

These APIs have been removed from SVG 2 but their original definitions can be found at:

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8cd960536c07e255b2e6f7e55c03c6d09274b215ccceaccc38926ffe03e098a7?d=identicon)[bgauthier](/maintainers/bgauthier)

---

Top Contributors

[![progers](https://avatars.githubusercontent.com/u/569214?v=4)](https://github.com/progers "progers (52 commits)")[![bgauthier](https://avatars.githubusercontent.com/u/1789355?v=4)](https://github.com/bgauthier "bgauthier (1 commits)")[![jgsmarques](https://avatars.githubusercontent.com/u/15315098?v=4)](https://github.com/jgsmarques "jgsmarques (1 commits)")

### Embed Badge

![Health badge](/badges/intelogie-pathseg/health.svg)

```
[![Health](https://phpackages.com/badges/intelogie-pathseg/health.svg)](https://phpackages.com/packages/intelogie-pathseg)
```

###  Alternatives

[paragonie/paserk

PHP implementation of PASERK (Platform Agnostic SERialized Keys), a PASETO extension.

17233.4k1](/packages/paragonie-paserk)[antonforwork/ivideon-php

IVideon

132.5k](/packages/antonforwork-ivideon-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
