| Crates.io | pnte |
| lib.rs | pnte |
| version | 0.3.3 |
| created_at | 2023-12-09 02:40:55.847191+00 |
| updated_at | 2025-09-12 14:45:46.998005+00 |
| description | 2D Graphics library for Windows in Rust |
| homepage | |
| repository | https://github.com/btanno/pnte |
| max_upload_size | |
| id | 1063231 |
| size | 660,185 |
2D Graphics library for Windows in Rust
pnte is a Direct2D and DreictWrite wrapper.
To use this library, CoInitializeEx must be called for each thread.
pnte::Context.let ctx = pnte::Context::new(pnte::Direct2D::new()?)?;
let render_target = ctx.create_render_target(&window, (size.width, size.height))?;
ctx.draw(&render_target, |cmd| {
let white = pnte::SolidColorBrush::new(&ctx, (1.0, 1.0, 1.0, 1.0))?;
cmd.clear((0.0, 0.0, 0.0, 0.0));
cmd.draw_text("pnte", (10.0, 10.0), &white)?;
})?;
This library is licensed under the MIT license.