33 releases (breaking)

0.30.0 Dec 16, 2024
0.29.1 Oct 1, 2024
0.29.0 Sep 26, 2024
0.28.1 Jul 5, 2024
0.10.0 Feb 28, 2021

#1076 in GUI

Download history 42724/week @ 2024-09-22 44236/week @ 2024-09-29 43931/week @ 2024-10-06 53235/week @ 2024-10-13 49709/week @ 2024-10-20 53171/week @ 2024-10-27 56774/week @ 2024-11-03 50228/week @ 2024-11-10 55096/week @ 2024-11-17 55377/week @ 2024-11-24 56923/week @ 2024-12-01 58867/week @ 2024-12-08 61320/week @ 2024-12-15 29001/week @ 2024-12-22 33252/week @ 2024-12-29 51140/week @ 2025-01-05

180,681 downloads per month
Used in 895 crates (22 directly)

MIT/Apache

755KB
12K SLoC

epaint - egui paint library

Latest version Documentation unsafe forbidden MIT Apache

A bare-bones 2D graphics library for turning simple 2D shapes and text into textured triangles.

Made for egui.


lib.rs:

A simple 2D graphics library for turning simple 2D shapes and text into textured triangles.

Made for egui.

Create some Shape:s and pass them to tessellate_shapes to generate Mesh:es that you can then paint using some graphics API of your choice (e.g. OpenGL).

Coordinate system

The left-top corner of the screen is (0.0, 0.0), with X increasing to the right and Y increasing downwards.

epaint uses logical points as its coordinate system. Those related to physical pixels by the pixels_per_point scale factor. For example, a high-dpi screen can have pixels_per_point = 2.0, meaning there are two physical screen pixels for each logical point.

Angles are in radians, and are measured clockwise from the X-axis, which has angle=0.

Feature flags

Dependencies

~2.1–8MB
~63K SLoC