https://github.com/drewcrawford/coregraphicsr
Rust bindings for Core Graphics
https://github.com/drewcrawford/coregraphicsr
core-graphics macos rust-lang
Last synced: about 2 months ago
JSON representation
Rust bindings for Core Graphics
- Host: GitHub
- URL: https://github.com/drewcrawford/coregraphicsr
- Owner: drewcrawford
- License: other
- Created: 2021-10-23T19:53:13.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-23T21:09:01.000Z (over 1 year ago)
- Last Synced: 2026-02-09T00:35:33.840Z (4 months ago)
- Topics: core-graphics, macos, rust-lang
- Language: Rust
- Homepage:
- Size: 23.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Provides select Rust bindings for Apple [Core Graphics](https://developer.apple.com/documentation/coregraphics). May be compared to [objrs_frameworks_core_graphics](https://crates.io/crates/objrs_frameworks_core_graphics)
and [core-graphics](https://crates.io/crates/core-graphics).
Part of the [objr expanded universe](https://github.com/drewcrawford/objr#objr-expanded-universe), distinctive features of coregraphicsr:
* Zero-cost abstractions. Calling this library should perform identically to calling CoreGraphics from Swift/ObjC applications.
* Most of the magic happens in [objr](https://github.com/drewcrawford/objr)
which provide cutting-edge high-performance primitives which are used here extensively.
* Safe APIs. Where possible APIs are designed with safe abstractions to provide familiar guarantees to Rust developers
* Low-level. These bindings assume familiarity with bound APIs and are not documented separately.
* Free for noncommercial or "small commercial" use.
# Status
The following APIs are implemented
* CGPoint, CGFloat, CGSize, and CGRect
* CGColor (greyscale only currently)
* CGDirectDisplayID
* CGColorSpace
* CGImageAlphaInfo
* CGContext, CGBitmapContext
* CGDataProvider, CGDataProviderCreateDirect
* CGImage