Giter Club home page Giter Club logo

piet's Introduction

Piet: a 2D graphics abstraction

Crates.io Documentation Build Status

This repo holds an API for 2D graphics drawing.

The motivation for this crate is set forth in this blog post. Ideally it will become a layer to help druid become cross-platform.

This repo is structured as a core API crate, "piet" and a separate crate for each back-end. One motivation for this structure is that additional back-ends can be written without coupling to the main crate, and clients can opt in to the back-ends they need. In addition, it's possible use multiple back-ends, which will likely be useful for testing.

A companion for Bézier path representation and geometry is kurbo.

Backends

piet-cairo crates.io

The piet-cairo crate depends on the cairo library, found at https://www.cairographics.org/download/. A simple test of the cairo backend is to run cargo run --example basic-cairo, which should produce an image file called temp-cairo.png.

piet-coregraphics crates.io

The piet-coregraphics crate works on macOS only. A simple test of the coregraphics backend is to run cargo run --example test-picture, which should produce an image file called coregraphics-test-0.png.

piet-direct2d crates.io

The piet-direct2d create works on Windows only. A simple test of the direct2d backend is to run cargo run --example basic, which should produce an image called temp-image.png.

piet-svg crates.io

piet-web crates.io

Roadmap

Since the project is in its infant stages, there's not currently a set roadmap. For a good idea of what the library will eventually be capable of see this list of requirements to be a backend 2D graphics library for the SVG rendering library resvg.

Contributing

Contributions are welcome! It's in early stages, so there are lots of opportunities to fill things out.

You can find other collaborators at xi.zulipchat.com under the #druid stream.

Inspirations

Piet's interface is largely inspired by the Skia Graphics Library as well as the C++ 2D graphics api proposal although piet aims to be much more lightweight and modular.

The Name

The library is of course named after Piet Mondrian. It's abstract and hopefully will be used for drawing lots of rectangles.

piet's People

Contributors

raphlinus avatar cmyr avatar rylev avatar hwchen avatar xstrom avatar dmitry-borodin avatar elrnv avatar scholtzan avatar forloveofcats avatar msiglreith avatar jneem avatar tyoverby avatar dianarg avatar siebelmann avatar cbrewster avatar jrmuizel avatar marcopolo avatar ralith avatar bzm3r avatar brunogouveia avatar clarkmoody avatar jplatte avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.