The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Fix bugs in transforms
2 years ago
Fixes bugs in transforms related to rotation and concatenation.
Fixes a bug where the untransformed path was being consulted for filling.
Asymptotic performance improvements for filling
2 years ago
Filling now uses a completely different algorithm, with asymptotic performance improvements. Typically this causes orders of magnitude faster filling. Quadratic and cubic paths are subdivided to a linearity at 1/2 of the subsample resolution, then replaced by lines. Counting intersections from -X infinity still happens, but once for all the left subsamples, then for each path line segment, the subsampled pixels are calculated and their counts incremented. Next, a summation pass adds up all the crossing counts from left to right for each subsample.
`Transform2D` can now transform all the points in a `Path` simultaneously, and the path is transformed into pixel coordinates before filling begins.
The `Line.fractionOfSegmentIntersection(with line:Line)` algorithm was replaced with one that can properly handle collinearity.
`.boundingBox` is now "tight", and `.fastBoundingBox` was added which is not tight, but extremely performant.
Stroking is still abysmally slow. Anybody want to do something like the above filling algorithm for stroking?
Add gradients, consolidate fill and stroke to draw
2 years ago
Filling & stroking a GraphicsContext are (conceptually) done simultaneously with one unified drawPath( method, which now takes any `Shader`.
You can use a `SolidColorShader`, or a `LinearGradient` or `RadialGradient` or any type you provide conforming to the Shader protocol.
`Transform2D` has had some bugs fixed, and comments added clarifying the direction transforms operate.
cubic path bug fixes
2 years ago
Also improves numerical stability in root finding.
Fix angled lines intersection algorithms
2 years ago
Fix several bugs...
2 years ago
Fix bugs in compositing, quadratic path filling, line stroke regions of interest, and intersection bounds validation.
Fix bug in quadratic curve .contains()
2 years ago
Add SampledGraphicsContext, SampledImage
2 years ago
Migrate SampledGraphicsContext and SampledImage from SwiftSampledGraphics, will delete the other repo.
Path.contains() algorithms are precise for all segment types.
Path.isPoint(_:,within:, ...) algorithm is precise for quadratic, but not for cubic bezier curves.
Feel free to contribute more precise algorithms and improve efficiency of existing algorithms.
Improve bezier curve geometric algorithms
2 years ago
Precise contains(Point) has been implemented on Path for all subpath types
Precise .isPoint(_ point:,within: has been implemented for quadratic path segments.
Poor .isPoint(_ point:,within: for cubics.
Initial release
2 years ago
Core geometries are concretely defined. Many protocols exist for defining how other concepts, like bitmaps and fonts will be layered over.