Skip to main content

Crate peniko

Crate peniko 

Expand description

A Rust 2D graphics type library

The peniko library builds on top of kurbo and color and provides a set of generic types that define styles for rendering and composition.

The name “peniko” is Esperanto for “brush” which is one family of types that the library contains.

Modules§

color
Color is a Rust crate which implements color space conversions, targeting at least CSS Color Level 4.
kurbo
2D geometry, with a focus on curves.
linebender_resource_handle
Linebender Resource Handle provides functionality for storing blobs of data and an associated ID. This primitive is adapted in Peniko to store images, but the FontData type lives in this crate. This crate is designed to allow making semver incompatible releases of Parley and Vello, whilst allowing them to be cross-compatible.

Structs§

BlendMode
Blend mode consisting of color mixing and composition functions.
Blob
Shared data with an associated unique identifier.
ColorStop
Offset and color of a transition point in a gradient.
ColorStops
Collection of color stops.
FontData
Owned shareable font resource.
Gradient
Definition of a gradient that transitions between two or more colors.
ImageBrush
Describes the image content of a filled or stroked shape.
ImageData
Owned shareable image resource.
ImageSampler
Parameters which specify how to sample an image during rendering.
LinearGradientPosition
Parameters that define the position of a linear gradient.
RadialGradientPosition
Parameters that define the position of a radial gradient.
SweepGradientPosition
Parameters that define the position of a sweep gradient.
WeakBlob
Weak reference to a shared blob.

Enums§

Brush
Describes the color content of a filled or stroked shape.
Compose
Defines the layer composition function for a blend operation.
Extend
Defines how a brush is extended when the content does not fill a shape.
Fill
Describes the rule that determines the interior portion of a shape.
GradientKind
Properties for the supported gradient types.
ImageAlphaType
Handling of alpha channel.
ImageFormat
Defines the pixel format of an image.
ImageQuality
Defines the desired quality for sampling an image.
InterpolationAlphaSpace
Defines how color channels should be handled when interpolating between transparent colors.
Mix
Defines the color mixing function for a blend operation.
Style
Describes draw style– either a fill or stroke.
StyleRef
Reference to a draw style.

Traits§

ColorStopsSource
Trait for types that represent a source of color stops.

Type Aliases§

BrushRef
Reference to a brush.
Color
A convenient alias for the color type used for Brush.
ImageBrushRef
Borrowed version of ImageBrush for avoiding reference counting overhead.