Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

NanoVG

NanoVG: antialiased 2D vector drawing (paths, fills, strokes, gradients, images, text), in an ImGui app.

Draw between begin_frame() and end_frame(), with the functions of the canvas API (begin_path(), rect(), fill()...). The nvg_imgui helpers create the context for Hello ImGui’s backend, and render the drawing to a window’s background or to a texture.

Upstream repository · The book’s page

Modules

In imgui_bundle (from imgui_bundle import nanovg):

Demos using it

The demos of the catalog that use it (the pictures link to their code and to the playground).

NanoVG: the full demo

NanoVG: the full demo

The demo of NanoVG, a vector drawing library: shapes, gradients, text, images.

More

Drawn each frame behind the GUI, or into a framebuffer that an ImGui image shows. The scene follows the mouse, and a checkbox blows it up.

Uses: NanoVG

Python: ▶︎ Run · Code
C++: ▶︎ Run · Code

NanoVG: a beating heart

NanoVG: a beating heart

A heart drawn with NanoVG beats in an ImGui image.

More

NanoVG is a vector drawing library; the drawing goes into a framebuffer that the image shows, and a color picker changes the heart’s color. The pattern for any NanoVG drawing inside a GUI: nvg_imgui.render_nvg_to_frame_buffer().

Uses: NanoVG

Python: ▶︎ Run · Code
C++: ▶︎ Run · Code