Giter Club home page Giter Club logo

piet's Introduction

Piet: a 2D graphics abstraction

Crates.io Documentation Build Status

Cross-platform 2D graphics.

The Piet project consists of a core crate (piet) which describes a 2D graphics API, and a number of "backends", which implement that API on top of the built-in 2D graphics system of a given platform. This allows the same drawing code to be used on different platforms, without having to bundle a full 2D renderer.

The motivation for this crate is set forth in this blog post. It is used as the basis of Druid, a cross-platform GUI toolkit.

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

Backends

For cross-platform use, the piet-common crate reexports the most appropriate implementation for the current target.

piet-cairo crates.io

The piet-cairo crate depends on the cairo library. A simple test of the cairo backend is to run cargo run --example test-picture 0, which should produce an image file called cairo-test-0.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 0, 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 test-picture 0, which should produce an image called d2d-test-0.png.

piet-svg crates.io

piet-web crates.io

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 named after Piet Mondrian. It is abstract and intended to be used for drawing lots of rectangles.

piet's People

Contributors

arthmis avatar brunogouveia avatar bzm3r avatar cbrewster avatar ciantic avatar clarkmoody avatar cmyr avatar derekdreery avatar dianarg avatar dmitry-borodin avatar elrnv avatar forloveofcats avatar hwchen avatar jaicewizard avatar jneem avatar jpochyla avatar jrmuizel avatar luizberti avatar maan2003 avatar marcopolo avatar msiglreith avatar psychon avatar ralith avatar raphlinus avatar rylev avatar scholtzan avatar siebelmann avatar smmalis37 avatar tyoverby avatar xstrom 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.