top of page

About ThorVG

Thor Vector Graphics is an open-source graphics library designed for creating vector-based scenes and animations. It combines immense power with remarkable lightweight efficiency, as Thor embodies a dual meaning—symbolizing both thunderous strength and lightning-fast agility. Embracing the philosophy of simpler is better, the ThorVG project provides intuitive, user-friendly interfaces while maintaining a compact footprint and minimal overhead.

​

The following list shows primitives that are supported by ThorVG:

  • Lines & Shapes: rectangle, circles, and paths with coordinate control

  • Filling: solid colors, linear & radial gradients, and path clipping

  • Stroking: stroke width, join, cap, dash patterns, and trimming

  • Scene Management: retainable scene graph & object transformations

  • Composition: various blending and masking

  • Text: unicode characters and horizontal text layout using the scalable fonts (TTF)

  • Images: SVG, JPG, PNG, WebP, Raw Bitmap

  • Animation: Lottie

anti-aliased_shapes.png

Anti-aliased Shapes

path-clipping.png

Path-Clipping

blending.png

Blending

gradient_filling.png

Gradient Filling

svg.png

SVG

texturing.png

Texturing

stroking.png

Stroking

masking.png

Masking

text.png

Text

Supported Platforms

ThorVG is currently under development and is expanding its support for essential platforms as needed. The major platforms that ThorVG currently supports for direct integration include the following:

platforms.png

Linux

MacOS

Windows

Tizen

iOS

Android

Web

Flutter

Structural Design

ThorVG is designed for a wide range of programs, offering adaptability for integration and use in various applications and systems. It achieves this through a single binary with selectively buildable, modular components in a building block style. This ensures both optimal size and easy maintanence.

example_structure.png

If your program includes the main renderer, you can seamlessly utilize ThorVG APIs by transitioning drawing contexts between the main renderer and ThorVG. Throughout these API calls, ThorVG effectively serializes drawing commands among volatile paint nodes. Subsequently, it undertakes synchronous or asynchronous rendering via its backend raster engines. Currently, ThorVG provides its own implementation of multiple raster engines, allowing you to choose the one that best suits your app and system preferences.

​

  • CPU/SIMD (Software)

  • OpenGL/ES

  • WebGL

  • WebGPU

​

ThorVG is adept at handling vector images, including formats like SVG, and it remains adaptable for accommodating additional popular formats as needed. In the rendering process, the library may generate intermediate frame buffers for scene compositing, though only when essential. The accompanying diagram provides a concise overview of how to effectively incorporate ThorVG within your system.

example_flow.png

Threading

ThorVG incorporates a threading mechanism that aims to seamlessly acquire subsequent scenes without unnecessary delays. It operates using a finely-tuned task scheduler based on thread pools, encompassing various tasks such as encoding, decoding, updating, and rendering. This design ensures that all tasks can effectively leverage multi-processing capabilities.

​

The task scheduler has been meticulously crafted to conceal complexity, streamline integration, and enhance user convenience. Therefore, the policy it employs is optional, allowing users to select it based on their specific requirements.

thorvg_threading.webp

SVG

ThorVG facilitates SVG (Scalable Vector Graphics) rendering via its dedicated SVG interpreter. Adhering to the SVG Tiny Specification, the implementation maintains a lightweight profile, rendering it particularly advantageous for embedded systems. While ThorVG comprehensively adheres to most of the SVG Tiny specs, certain features remain unsupported within the current framework. These include:

  • Animation

  • Interactivity

  • Multimedia

512px-Ghostscript_Tiger_svg.webp

Ghostscript Tiger using ThorVG

Lottie

ThorVG supports the most powerful Lottie Animation features. Lottie is an industry standard, JSON-based vector animation file format that enables seamless distribution of animations on any platform, akin to shipping static assets. These files are compact and compatible with various devices, scaling up or down without pixelation. With Lottie, you can easily create, edit, test, collaborate, and distribute animations in a user-friendly manner. For more information, please visit Lottie Animation Community' website.

Lottie animations powered by ThorVG

Please check out the ThorVG Test to see the performance of various Lottie Animations powered by ThorVG.

ThorVG Viewer

ThorVG provides the resource verification tool for the ThorVG Engine. It does immediate rendering via web browser running on the ThorVG web-assembly binary, allowing real-time editing of the vector elements on it. It doesn't upload your resources to any external server while allowing to export to supported formats such as GIF, so the designer resource copyright is protected.

In Practice

The following list showcases various practical examples of ThorVG in use.

Canva iOS

Canva, a leading visual communication platform, is a household name among creators, marketers, designers, students, and more, with millions of users worldwide. It empowers users to create stunning visual content with a user-friendly interface and a vast library of templates and design elements. The Canva iOS app transitioned from the existing Lottie animation engine to ThorVG for Lottie animations, resulting in approximately an 80% improvement in rendering speed and a 70% reduction in peak memory usage.

example_canvaios.png

dotLottie

dotLottie is an open-source file format that aggregates one or more Lottie files and their associated resources, such as images and fonts, into a single file. This enables an efficient and easy distribution of animations. dotLottie files are ZIP archives compressed with the Deflate compression method and carry the file extension of “.lottie”. Think of it as a superset of Lottie. LottieFiles aims to achieve just that. dotLottie player by LottieFiles is now powered by ThorVG.

example_dotlottie_edited.jpg

Flux Audio

Flux is a cutting-edge audio technology company specializing in high-fidelity sound systems and immersive audio experiences. With a focus on delivering precision and quality, Flux Audio leverages advanced software solutions to enhance audio processing across a wide range of devices. ThorVG is integrated into the user interface of Flux products, providing efficient and scalable vector rendering for their visual elements, ensuring a sleek and responsive user experience. This collaboration highlights ThorVG’s versatility in high-performance audio platforms.

example_flux.jpg

Godot

ThorVG has been integrated into the Godot project to enable the creation of sleek and visually appealing user interfaces (UIs) and vector resources in the Godot game engine. Godot is a modern game engine that is both free and open-source, offering a comprehensive range of tools. With Godot, you can concentrate on developing your game without the need to recreate existing functionalities.

example_godot.webp

LVGL

LVGL is an open-source graphics library specifically designed for embedded systems with limited resources. It is lightweight and highly customizable, providing support for graphical user interfaces (GUIs) on microcontrollers, IoT devices, and other embedded platforms. ThorVG serves as the vector drawing primitives library in the LVGL framework.

example_lvgl.png

Tizen

ThorVG has been integrated into the Tizen platform as the vector graphics engine. NUI is the name of Tizen UI framework which is written in C#. ThorVG is the backend engine of the NUI Vector Graphics which is used for vector primitive drawings and scalable image contents such as SVG and Lottie Animation among the Tizen applications.

tizen.png

Contributors

ThorVG stands as a purely open-source initiative. We are grateful to the individuals, organizations, and companies that have contributed to the development of the ThorVG project. The dedicated efforts of the individuals and entities listed below have enabled ThorVG to reach its current state.

Sponsors

We extend our gratitude to our financial sponsors, whose generous support empowers the ThorVG project. Their funding enables us to continually enhance and expand this open-source project, making it more powerful, efficient, and accessible for the entire community.

example_lottiefiles.jpg

We are also seeking your support to ensure the continued development of the ThorVG project. Your generous donations will help cover operational costs and contribute to the growth of this open-source project. Even a small contribution can make a big difference in securing the future of ThorVG!

bottom of page