[][src]Crate piet_common

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.

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.

Modules

kurbo

A garden of data structures for manipulating 2D curves.

Structs

Error

An error that can occur while rendering 2D graphics.

GradientStop

Specification of a gradient stop.

LinearGradient

Specification of a linear gradient.

RadialGradient

Specification of a radial gradient.

StrokeStyle

Options for drawing stroked lines.

Enums

Color

A datatype representing color.

ErrorKind
FillRule

A fill rule for resolving winding numbers.

Gradient

Specification of a gradient.

ImageFormat

The pixel format for bitmap images.

InterpolationMode

A requested interpolation mode for drawing images.

LineCap

Options for the cap of stroked lines.

LineJoin

Options for angled joins in strokes.

Traits

Font
FontBuilder
RenderContext

The main trait for rendering graphics.

RoundFrom

This is our own implementation of a "lossy From" trait, representing a conversion that can have precision loss. It is essentially adapted from https://github.com/rust-lang/rfcs/pull/2484.

RoundInto

The companion to RoundFrom. As with From and Into, a blanket implementation is provided; for the most part, implement RoundFrom.

Text
TextLayout
TextLayoutBuilder

Functions

new_error

Create a new error of the given kind.