Releases: hfutrell/BezierKit
v0.5.2
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 acgPath
which has a subpath that was started without amove(to:)
command - fixes behavior of
Path.intersections(with:)
for with open paths that intersect at end points.
v0.5.1
v0.5.0
changes:
- upgraded swift version to 5.0
- renames
BezierCurve.project(point: pointToProject, errorThreshold: epsilon)
toBezierCurve.project(_:, accuracy:)
. The method now returns a tuple(point: CGPoint, t: CGFloat)
for applications that need thet
value of the projection. - the
errorThreshold
parameter ofPath.pointIsWithinDistanceOfBoundary
has been renamed toaccuracy
v0.4.0
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 pointsPathComponent.enumeratePoints(includeControlPoints:, using:)
- allows subclassing of
Path
andPathComponent
- adds
Comparable
support toIndexedPathLocation
andIndexedPathComponentLocation
- 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
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
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
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