#graphics #2d #game #piston #triangulation

piston2d-graphics

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

61 releases (32 breaking)

0.32.0 May 24, 2019
0.30.0 Jan 20, 2019
0.28.0 Nov 15, 2018
0.26.0 Feb 22, 2018
0.0.1 Dec 13, 2014

#5 in Graphics APIs

Download history 615/week @ 2019-02-08 538/week @ 2019-02-15 604/week @ 2019-02-22 604/week @ 2019-03-01 582/week @ 2019-03-08 414/week @ 2019-03-15 904/week @ 2019-03-22 477/week @ 2019-03-29 588/week @ 2019-04-05 554/week @ 2019-04-12 747/week @ 2019-04-19 458/week @ 2019-04-26 703/week @ 2019-05-03 610/week @ 2019-05-10 737/week @ 2019-05-17

2,753 downloads per month
Used in 71 crates (35 directly)

MIT license

135KB
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

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
  • Reasonable defaults with resolution detection whenever possible

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

Used by

Dependencies

dependencies

Dependencies

~202KB