Core geometries & protocols for a pure-Swift implementation of 2D graphics rendering.
WIP. There are probably many convenience & efficient algorithms missing. There may be missing concepts or cases.
typealias SGFloat = Float64
Coordinate system assumes x+ to the right, y+ is down the page. Placing (0,0) in the upper left hand corner.
struct Point
struct Size
struct Transform2D
Check out Path
, SubPath
, PathSegment
.
Precise algorithms for whether a point is in a SubPath is done, but algorithms for decomposiing the subpaths into sub-pixel triangles is not done.
SampledImage
link |
Stars: 2 |
Last commit: 3 years ago |
Fixes bugs in transforms related to rotation and concatenation. Fixes a bug where the untransformed path was being consulted for filling.
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics