piet

An abstraction for 2D graphics.

  • 所有者: linebender/piet
  • 平台:
  • 许可证: Apache License 2.0
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

Piet: a 2D graphics abstraction

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, currently "piet-direct2d", "piet-cairo", and "piet-web". 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.

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".

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

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.

主要指标

概览
名称与所有者linebender/piet
主编程语言Rust
编程语言Rust (语言数: 4)
平台
许可证Apache License 2.0
所有者活动
创建于2019-01-02 06:09:58
推送于2025-05-09 14:22:18
最后一次提交
发布数32
最新版本名称v0.7.0 (发布于 )
第一版名称v0.0.3 (发布于 )
用户参与
星数1.3k
关注者数35
派生数94
提交数724
已启用问题?
问题数152
打开的问题数62
拉请求数390
打开的拉请求数8
关闭的拉请求数44
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?