View Source API Reference vivid v0.4.4

Modules

Vivid is a 2D rendering engine implemented purely in Elixir.

This module represents an Arc, otherwise known as a circle segment.

Provides information about the bounds of a box and pixel positions within it.

This protocol is used to calculate the bounds of a given shape.

Short-hand for creating rectangle polygons.

Used to convert a Frame into a buffer for display.

Represents a circle based on it's center point and radius.

This module takes characters generated by the Hershey module and converts them into groups of shapes using the character's specified left and right padding.

Describes an individual character defined by a Hershey font file.

Frame represents a collection of colours and shapes.

Represents a collection of shapes which can be Rasterized in a single pass.

Supports reading the Hershey Vector Font format and converting them into paths.

Represents a line segment between two Points in 2D space.

I made this because I was constantly importing a small selection of Erlang's :math module, and then manually implementing degrees_to_radians/1 which got pretty annoying after a while.

Describes a path as a series of vertices.

Represents an individual point in (2D) space.

Describes a Polygon as a series of vertices.

Defines a colour in RGBA colour space.

The Rasterize protocol is responsible for converting shapes into bitmaps.

Doesn't do anything - is merely a type to represent an arbitrary shape in typespecs.

Handle conversions of arbitrary shapes into strings.

Creates and applies a "pipeline" of transformations to a shape. Transformation operations are collected up and only run once, when apply is called.

An operation that can be applied to a shape.

Standard transformations which can be applied to points without knowing the details of the geometry.

This protocol is used to apply point transformations to a shape.