#2d-graphics #graphics #2d #2d-game #piston #triangulation

piston2d-graphics

A library for 2D graphics that works with multiple back-ends

73 releases (45 breaking)

0.45.0 Sep 17, 2024
0.44.0 Sep 26, 2023
0.43.0 Nov 18, 2022
0.42.0 Feb 23, 2022
0.0.1 Dec 13, 2014

#94 in Graphics APIs

Download history 3789/week @ 2024-08-18 4529/week @ 2024-08-25 4334/week @ 2024-09-01 3788/week @ 2024-09-08 3684/week @ 2024-09-15 4847/week @ 2024-09-22 3657/week @ 2024-09-29 872/week @ 2024-10-06 2976/week @ 2024-10-13 2796/week @ 2024-10-20 3998/week @ 2024-10-27 3405/week @ 2024-11-03 1066/week @ 2024-11-10 2081/week @ 2024-11-17 3788/week @ 2024-11-24 3228/week @ 2024-12-01

10,351 downloads per month
Used in 114 crates (52 directly)

MIT license

140KB
3K SLoC

Graphics Build Status Crates.io Crates.io

A library for 2D graphics, written in Rust, that works with multiple back-ends.

Maintainers: @bvssvni

Documentation

Getting Started

How to contribute

Back-ends
opengl_graphics
gfx_graphics
glium_graphics

Motivation

Sharing graphics source code across projects in Rust

Rust is programming language developed by Mozilla and the Rust community. It is fast, safe, concurrent and cross platform. Because of the many numbers of potential platforms (read: all kinds of computers), it would be nice to have a 2D graphics library that works with multiple back-ends, so you don't have to invent a new graphics engine for each platform you are working on.

One trait for all back-ends

To write your own back-end, use the Graphics trait. The Graphics trait implements default behavior for some methods, which can be overridden for higher quality or better performance.

Goals

  • Easy to use
  • Minimal dependencies
  • Vector graphics
  • Images
  • Text
  • Clipping
  • To have a feature complete library for 2D graphics in general

Non-Goals

  • Image formats
  • Backward compatibility (expect lot of breaking)
  • Platform or back-end specific code
  • 3D
  • Physics
  • Node tree
  • One-to-one correspondence with standards
  • Integration with platform GUI
  • Resolution detection

Used by

Dependencies

dependencies

Dependencies

~110–280KB