embedded_graphics_core - Rust (original) (raw)

Crate embedded_graphics_core

Source

Expand description

embedded-graphics-core contains the core components of embedded-graphics that are required to add embedded-graphics support to display drivers, image libraries, text renderers and other third party crates.

This crate should only be used by crates that extend embedded-graphics. Applications should instead depend on embedded-graphics itself.

Like any other crate, embedded-graphics-core will change over time, however it will change at a much slower rate than embedded-graphics itself, and will likely release fewer breaking changes. This will provide more stability and compatability for the weider embedded-graphics ecosystem, whilst allowing non-core features of embedded-graphics to evolve at a faster pace. The same version of embedded-graphics-core may be used for multiple major versions of embedded-graphics.

§Core functionality

§Colors

The pixelcolor module provides various standard color types, from BinaryColor toRgb888. See the pixelcolor module documentation for the complete list of color depths and formats available.

§Display drivers

See the DrawTarget documentation for examples on how to integrate embedded-graphics with a display driver using the DrawTarget trait.

§Images

The ImageDrawable trait should be implemented for any image or image-like item, for example a spritemap.

§Features

draw_target

A target for embedded-graphics drawing operations.

geometry

Geometry module.

image

Image drawable.

pixelcolor

Pixel color types.

prelude

Prelude

primitives

Core primitives.

Pixel

A single pixel.

Drawable

Marks an object as “drawable”. Must be implemented for all graphics objects