Swiftpack.co - benspratling4/SwiftGraphicsCore as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by benspratling4.
benspratling4/SwiftGraphicsCore 2.1.1
Core geometries & protocols for a pure-Swift implementation of 2D graphics rendering.
⭐️ 2
🕓 3 years ago
.package(url: "https://github.com/benspratling4/SwiftGraphicsCore.git", from: "2.1.1")

SwiftGraphicsCore

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.

Linear Distance

typealias SGFloat = Float64

2D Coordinates

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

Bezier paths

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.

Bitmap Images

SampledImage

GitHub

link
Stars: 2
Last commit: 3 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Fix bugs in transforms
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