Crate druid::piet

Expand description

A piet backend appropriate for the current platform.

This crate reexports the piet crate, alongside an appropriate backend for the given platform. It also exposes kurbo, which defines shape and curve types useful in drawing, and image for image manipulation.

The intention of this crate is to provide a single dependency that handles the common piet use-case. If you have more complicated needs (such as supporting multiple backends simultaneously) you should use crates such as piet and piet-cairo directly.

The associated types for brushes, text, and images are exported as type definitions (resolving to concrete types within the backend), so they can be used directly. The text-related types are prefixed with “Piet” to avoid conflict with the text traits that would otherwise have the same name.

Also note that all public types for the specific backend are re-exported, but have their docs hidden here. These types can be useful for platform integration, and also potentially to access extensions specific to the backend. The types documented below can be used portable across all backends.

Modules

  • Convenience wrappers for Direct2D objects.
  • Convenience wrappers for DirectWrite objects.
  • Overview
  • 2D geometry, with a focus on curves.
  • utilities shared by various backends Code useful for multiple backends

Structs

Enums

Traits

Type Definitions

  • The associated brush type for this backend.
  • The RenderContext for the Direct2D backend, which is selected.
  • The associated image type for this backend.
  • The associated text factory for this backend.
  • The associated text layout type for this backend.
  • The associated text layout builder for this backend.