svg-intersections
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -88,3 +88,3 @@ var Point2D = require('kld-affine').Point2D; | ||
/** | ||
/** | ||
* init | ||
@@ -546,2 +546,6 @@ * | ||
} | ||
AbsoluteArcPath.prototype = new AbsolutePathSegment(); | ||
AbsoluteArcPath.prototype.constructor = AbsoluteCurveto2; | ||
AbsoluteArcPath.superclass = AbsolutePathSegment.prototype; | ||
AbsoluteArcPath.prototype.init = function(command, params, previous) { | ||
@@ -548,0 +552,0 @@ var point = new Array(); |
{ | ||
"name": "svg-intersections", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "A library of intersection algorithms covering all SVG shape types", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -42,2 +42,12 @@ var bezier = require('../lib/functions/bezier'); | ||
assert.equal(result.points[0].equals(new Point2D(5.75, 5.75)), true); | ||
} | ||
} | ||
exports.testIntersectArcLine = function(beforeExit, assert) { | ||
var arc = shape("path", {d: "M0 20 A 20 20, 0, 0, 0, 20 0"}); | ||
var line = shape("line", {x1: 0, y1:0, x2:20, y2:20}); | ||
var result = intersect(arc, line); | ||
assert.equal(1, result.points.length); | ||
assert.equal(result.points[0].distanceFrom(new Point2D(0, 0)), 20); | ||
assert.equal(result.points[0].x, result.points[0].y); | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
109928
2267