Registry / other / core-graphics

core-graphics

JSON →
library0.25.0rscratesunverified

Rust bindings to Apple's Core Graphics framework for macOS.

# Cargo.toml [dependencies] core-graphics = "0.25.0"
INSTALL
IMPORT
SIG · CORE-GRAPHICS
C
core-graphics
otherrustv0.25.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CGContext
use core_graphics::context::CGContext;

Create a bitmap graphics context.

use core_graphics::context::CGContext; fn main() { // Example: create a bitmap context let width = 100; let height = 100; let ctx = CGContext::create_bitmap_context( None, width, height, 8, 0, &core_graphics::color_space::CGColorSpace::create_device_rgb(), core_graphics::base::kCGImageAlphaPremultipliedFirst, ); println!("Created CGContext: {:?}", ctx); }
Debug
Known issues
gotchaOnly available on macOS (requires Core Graphics framework).
fix
Use conditional compilation with #[cfg(target_os = "macos")].
affects: >=0.1.0
Upgrade
Version history
0.25.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Meta
1
Resources
core-graphics — cargo add core-graphics · libregistry