adamwulf/ClippingBezier
关于
ClippingBezier calculates intersection points, paths, and shapes between two UIBezierPaths
开发工具实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文ClippingBezier
This library adds categories to UIBezierPath to simplify clipping a single closed UIBezierPath with another closed or unclosed UIBezierPath.
ClippingBezier in Loose Leaf
The ClippingBezier.framework powers the scissors tool in Loose Leaf, and it allows for drawing to be clipped to any imported image scraps.

Available as a Swift Package!
Install ClippingBezier in your project through Swift Package Manager as of v1.2.0!
Building the framework
This library will generate a proper static framework bundle that can be used in any iOS7+ project.
Including in your project
- Link against the built framework and the included PerformanceBezier framework
- Add "-ObjC++ -lstdc++" to the Other Linker Flags in the project's Settings
- #import <PerformanceBezier/PerformanceBezier.h>
- #import <ClippingBezier/ClippingBezier.h>
Dependencies
This library depends on the UIBezierPath performance improvements in the PerformanceBezier library.
Example
UIBezierPath* aClosedPath = /* some path */;
UIBezierPath* scissorPath = /* some other path */;
NSArray* subshapes = [aClosedPath uniqueShapesCreatedFromSlicingWithUnclosedPath:scissorPath];
for(DKUIBezierPathShape* shape in subshapes){
UIBezierPath* aClosedPathSlice = shape.fullPath;
}
Screenshots
Find intersections between two UIBezierPaths:

Or find the component shapes generated from two path's intersections

Sample Application
The Xcode workspace includes a ClippingExampleApp project that shows a fully functional integration of the ClippingBezier framework. You can refer to this example for any questions about how to integrate into your app.
License
The ClippingBezier framework and sample code are provided under the MIT License.
Support This Project
- Download Loose Leaf
- Follow @adamwulf on twitter.
- Become a Github Sponsor and buy me a coffee ☕️ 😄
探索相关项目
加载中…