Skip to content

Releases: hfutrell/BezierKit

v0.5.2

03 May 21:49
Compare
Choose a tag to compare

This release includes several minor bugfixes:

  • ensures that calling BezierCurve.split(from:, to:) on a set of ranges creates a series of curves that are exactly continuous
  • fixes a crash when creating an instance of Path from a cgPath which has a subpath that was started without a move(to:) command
  • fixes behavior of Path.intersections(with:) for with open paths that intersect at end points.

v0.5.1

26 Apr 23:56
Compare
Choose a tag to compare
  • added notion of PathComponentRange and PathComponent.split(range:) using it.
  • made it easier for subclassers to support splitting by making it so method to override is guaranteed to be passed a standardized range.

v0.5.0

25 Apr 22:06
Compare
Choose a tag to compare

changes:

  • upgraded swift version to 5.0
  • renames BezierCurve.project(point: pointToProject, errorThreshold: epsilon) to BezierCurve.project(_:, accuracy:). The method now returns a tuple (point: CGPoint, t: CGFloat) for applications that need the t value of the projection.
  • the errorThreshold parameter of Path.pointIsWithinDistanceOfBoundary has been renamed to accuracy

v0.4.0

24 Apr 23:56
Compare
Choose a tag to compare

New features:

  • adds ability to split path components with PathComponent.split(from:, to:)
  • adds utility method for enumerating over points of PathComponent with option to include or exclude control points PathComponent.enumeratePoints(includeControlPoints:, using:)
  • allows subclassing of Path and PathComponent
  • adds Comparable support to IndexedPathLocation and IndexedPathComponentLocation
  • adds distanceSquared function between points

bugfixes

  • fixes a memory leak in vector boolean operations
  • improves support for converting to and from CoreGraphics paths that have single point subpaths

v0.3.0

09 Apr 00:42
Compare
Choose a tag to compare

This release refactors several intersection methods and adds new intersects(with:) -> Bool methods for better API usage when the caller only cares if things intersect (without caring about the intersections themselves).

It makes public the Flatness API for determining the maximum distance a Bezier curve strays from the line segment connecting its endpoints.

It renames "threshold" parameters to the more descriptive "accuracy"

It has several other miscellaneous renamings.

v0.2.1

26 Mar 22:57
Compare
Choose a tag to compare

greatly improves the accuracy of Path.pointIsWithinDistanceOfBoundary(point:, distance:) and BezierCurve.project(point:). Adds an errorThreshold parameter to these functions and related functions (with a default value) so that the caller can control speed vs accuracy of the result.

v0.2.0

18 Mar 23:45
Compare
Choose a tag to compare

This release adds Path.data and Path(data: Data) methods to convert between Path instances and a compact binary representation for serialization / deserialization.

The release also dramatically reduces the memory usage of Path instances.

Path.subpaths has been renamed Path.components

Path.curves may be deprecated in the future. To access elements it's recommended that you use Path.element(at:) instead. It's recommended that you use Path.elementCount instead of Path.curves.count because it's much faster.

Exposed CGPoint.cross(_:) vector cross product method

v0.1.19

26 Feb 00:44
Compare
Choose a tag to compare
disabled unit test that I was never able to get passing. It is not a …

v0.1.18

15 Feb 15:57
Compare
Choose a tag to compare
version # bump

v0.1.17

31 Jan 23:47
Compare
Choose a tag to compare

improved speed of Path.intersects() and Path.crossingsRemoved() dramatically in some cases by optimizing intersection of neighboring curves on the path.