Skip to main content

Module primitives

Module primitives 

Source
Expand description

Core primitive types for plotkit rendering.

This module defines the fundamental drawing primitives used throughout the plotkit rendering pipeline: geometric shapes, colors, strokes, text styles, paths, and images. These types form the interface between chart logic and backend renderers — no backend-specific types appear here.

Structs§

Affine
A 2D affine transform.
Color
An RGBA color with 8 bits per channel.
DashPattern
A repeating dash pattern for stroked paths.
Image
A raster image stored as raw RGBA pixel data.
Paint
Describes how a filled region should be painted.
Path
A vector path composed of a sequence of PathEl elements.
Point
A 2D point in device-independent coordinates.
Rect
An axis-aligned rectangle defined by its top-left corner and dimensions.
Stroke
Describes the visual style of a stroked path.
TextStyle
Controls how text is rendered: size, color, weight, font, and alignment.

Enums§

FontWeight
Font weight selector.
HAlign
Horizontal text alignment.
PathEl
A single element within a Path.
StrokeCap
The shape applied at the endpoints of an open sub-path.
StrokeJoin
The shape applied at the join between two path segments.
VAlign
Vertical text alignment.