Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svg-arc-to-cubic-bezier

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svg-arc-to-cubic-bezier

A function that takes an SVG arc curve as input, and maps it to one or more cubic bezier curves

  • 3.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is svg-arc-to-cubic-bezier?

The svg-arc-to-cubic-bezier npm package is a utility that converts SVG arc commands into cubic Bezier curves. This is useful for rendering SVG paths in environments that do not support arc commands or for simplifying path data.

What are svg-arc-to-cubic-bezier's main functionalities?

Convert SVG Arc to Cubic Bezier

This feature allows you to convert an SVG arc command into a series of cubic Bezier curves. The input is an object containing the parameters of the arc, and the output is an array of cubic Bezier curve commands.

const arcToCubicBezier = require('svg-arc-to-cubic-bezier');

const arcParams = {
  px: 100, // start point x
  py: 100, // start point y
  cx: 200, // end point x
  cy: 200, // end point y
  rx: 50,  // x radius
  ry: 50,  // y radius
  xAxisRotation: 0, // x-axis rotation
  largeArcFlag: 0, // large arc flag
  sweepFlag: 1  // sweep flag
};

const cubicBezierCurves = arcToCubicBezier(arcParams);
console.log(cubicBezierCurves);

Other packages similar to svg-arc-to-cubic-bezier

Keywords

FAQs

Package last updated on 07 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc