Crates.io | nanovg |
lib.rs | nanovg |
version | 1.0.2 |
source | src |
created_at | 2015-05-03 13:33:19.509051 |
updated_at | 2018-08-27 22:44:53.820129 |
description | Idiomatic bindings to the NanoVG library |
homepage | https://github.com/KevinKelley/nanovg-rs |
repository | https://github.com/KevinKelley/nanovg-rs |
max_upload_size | |
id | 2011 |
size | 3,404,316 |
NanoVG-RS is a wrapper around the NanoVG vector graphics library for the Rust programming language.
NanoVG is small antialiased vector graphics rendering library for OpenGL. It has lean API modeled after HTML5 canvas API. It is aimed to be a practical and fun toolset for building scalable user interfaces and visualizations.
NanoVG-RS provides a fully featured, functional, high-level and Rust-idiomatic API on top of the NanoVG C-API.
We recommend grabbing the latest release from crates.io.
Alternatively, you can clone and build the library yourself:
git clone --recursive https://github.com/KevinKelley/nanovg-rs
cd nanovg-rs
cargo build --features "gl3"
This library comes with a couple examples:
demo-glutin
. If you want to make sure that nanovg is working on your system, clone and build this crate as shown above and run the command cargo run --example demo-glutin --features="gl3"
. This should produce a window similar to that below.cargo run --example demo-clock --features "gl3"
Note that when running the examples, the needed resources might not be found if you run it without a cargo run --example
command. Thist is just a working-directory path issue.
Add the following to your Cargo.toml
:
[dependencies.nanovg]
version = "Use the latest version from crates.io"
features = ["glX"]
glX
can be exactly one of gl2
, gl3
, gles2
or gles3
,
to specify the version of OpenGL to use. Use gl3
or gl2
for computers and gles3
or gles2
for mobile devices.
TODO: SIMPLE API GUIDE
You can see more screenshots here.
Output of the demo-ui
example.
The binding is licensed under the MIT license. NanoVG is released under the zlib license.
Test-font Mechanic of the Heart by Agathe M.Joyce.