MCPcopy Index your code
hub / github.com/PistonDevelopers/graphics

github.com/PistonDevelopers/graphics @v0.0.47

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.0.47 ↗ · + Follow
180 symbols 309 edges 25 files 82 documented · 46% updated 22mo ago★ 48143 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Graphics Build Status

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

Maintainers: @bvssvni, @Coeuvre

Graphics online docs

Notice: This is a very early stage of the project!

How to contribute

Latest news: Text!

Back-ends
opengl_graphics
gfx_graphics

Experimental algorithms are developed in a separate repository: Graphics-Lab

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 BackEnd trait. The BackEnd trait implements default behavior for all methods, so it is up to you how much code to write. If it can not find a method, it will call the unimplemented! macro.

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 compability (expect lot of breaking)
  • Platform or back-end specific code
  • 3D
  • Physics
  • Node tree
  • One-to-one correspondence with standards
  • Integration with platform GUI

Dependencies

dependencies

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 91
Function 68
Class 13
Interface 6
Enum 2

Languages

Rust100%

Modules by API surface

src/math.rs27 symbols
src/rectangle.rs16 symbols
src/triangulation.rs14 symbols
src/transformed.rs13 symbols
src/deform.rs12 symbols
src/line.rs11 symbols
src/image.rs11 symbols
src/ellipse.rs10 symbols
src/context.rs10 symbols
src/character.rs7 symbols
src/source_rectangled.rs6 symbols
src/polygon.rs6 symbols

For agents

$ claude mcp add graphics \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page