A 2D vector graphics library optimized for GUIs, written in Rust and wgpu

Related tags

Graphics rootvg
Overview

RootVG

Documentation Crates.io License

A 2D vector graphics library optimized for GUIs, written in Rust and wgpu

How it Works

Unlike other 2D vector graphics libraries which have a streaming drawing API similar to HTML5's Canvas API, users of RootVG construct reusable "primitives" that can be cheaply cloned and added in any order with any z index and inside of any scissoring rectangle. Primitives of the same type, z index, and scissoring rectangle are automatically batched together so that the number of draw calls to the GPU are greatly reduced.

See the demo for a quick overview of how the API works.

Primitive Types

RootVG provides six primitive types:

  • SolidQuadPrimitive and GradientQuadPrimitive - based on the quad primitives from Iced
  • SolidMeshPrimitive and GradientMeshPrimitive - draws arbitrary triangles with a solid color or a gradient. The lyon crate is used to generate meshes.
  • TextPrimitive - powered by glyphon
  • ImagePrimitive - supports scale and rotation. The output of a previous render pass can also be used as a texture source.

Additionally, users can create custom primitives with custom rendering pipelines. This can be useful for creating things like efficient spectrometer and oscilloscope displays.

Primitives types that aren't needed can be disabled in the feature flags.

Motivation

This library was created for the Yarrow GUI library which powers the Meadowlark DAW.

You might also like...
ASCII 3D-renderer using Ray Marching technique written in Rust with NCurses
ASCII 3D-renderer using Ray Marching technique written in Rust with NCurses

pistol ASCII renderer using Ray Marching technique written in Rust 🦀 with NCurses. This project is a giga-chad compared to my previous attempt to wri

CPU-Accelerated 3D renderer fully written in Rust
CPU-Accelerated 3D renderer fully written in Rust

Bogo-Renderer CPU-Accelerated 3D renderer fully written in Rust. This is 100% hobby project. Don't expect anything from it. Showcases Features Soft Sh

Graph data structure library for Rust.

petgraph Graph data structure library. Supports Rust 1.41 and later. Please read the API documentation here Crate feature flags: graphmap (default) en

A graph library for Rust.

Gamma A graph library for Rust. Gamma provides primitives and traversals for working with graphs. It is based on ideas presented in A Minimal Graph AP

Simple but powerful graph library for Rust

Graphlib Graphlib is a simple and powerful Rust graph library. This library attempts to provide a generic api for building, mutating and iterating ove

The library provides basic functions to work with Graphviz dot lang from rust code.

Description The library provides the basic access to the graphs in graphviz format with ability to import into or export from it. Base examples: Parse

Rust library for of graph ensembles

Rust library for random graph ensembles Minimal Rust version: 1.55.0 Implements simple sampling and monte carlo (or rather markov-) steps, that can be

An SVG rendering library.

resvg resvg is an SVG rendering library. Purpose resvg can be used as a Rust library, a C library and as a CLI application to render SVG files based o

Library for Rubik's cube applications.

Rubik Master cube-demo3.mov Do you like to solve Rubik's cube? I do. As a cuber and programmer, I want to build a toolset to build applications like S

Comments
  • OpenGL bug with scissor rectangles

    OpenGL bug with scissor rectangles

    There seems to be a bug in wgpu when setting scissoring rectangles with the OpenGL backend, causing rendering issues. Further investigation is needed.

    I have only tested the OpenGL backend on my Arch Linux system running on an AMD RX570 graphics card with the KDE desktop environment (I get the same problem in both Wayland and X11).

    (I'm creating this issue for future reference.)

    opened by BillyDM 0
Owner
Meadowlark
Meadowlark
A graphics engine that I made in rust for my high school graphics course.

A graphics engine that I made in rust for my high school graphics course.

Mohammad Khan 1 May 29, 2022
Small, lightweight and fast library for rendering text with wgpu.

wgpu-text wgpu-text is a wrapper over glyph-brush for fast and easy text rendering in wgpu. This project was inspired by and is similar to wgpu_glyph,

Leon 20 Nov 30, 2022
A little cross-platform graphics engine written in rust.

Bismuth This is a version of my C++ graphics engine named Bismuth re-written with Rust. My goal is to learn more about the Rust language and make my g

Admiral サイタマ 1 Nov 1, 2021
Generic framebuffer implementation in Rust for use with embedded-graphics library

Fraramebuffer implementation for Rust's Embedded-graphics Framebuffer approach helps to deal with display flickering when you update multiple parts of

Bernard Kobos 9 Nov 29, 2022
Kiss3d - Keep it simple, stupid 3d graphics engine for Rust.

Kiss3d - Keep it simple, stupid 3d graphics engine for Rust.

Sébastien Crozet 1.2k Dec 26, 2022
Rust bindings to bgfx, a cross-platform, graphics API agnostic

Rust bindings to bgfx, a cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.

Daniel Collin 65 Dec 24, 2022
wgpugd: A WebGPU Graphics Device for R

wgpugd: A WebGPU Graphics Device for R Overview What is WebGPU? WebGPU is an API that exposes the capabilities of GPU hardware. What is wgpu? As the n

Hiroaki Yutani 42 Dec 11, 2022
Graphite is a digital content creation software package for 2D graphics

Powerful 2D vector and raster editing. Procedural and nondestructive. Graphite is a digital content creation software package for 2D graphics, merging

Graphite 2.1k Jan 9, 2023
A cool, fast maze generator and solver written in Rust

MazeCruncher Welcome to maze cruncher! Download Standalone Here Usage To get started, just run the standalone .exe in target/release or compile and ru

null 69 Sep 20, 2022
Sub-pixel precision light spot rendering library for astronomy and video tracking applications.

Planetarium Sub-pixel precision light spot rendering library for astronomy and video tracking applications. Example usage use planetarium::{Canvas, Sp

Sergey Kvachonok 5 Mar 27, 2022