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.
- Dash
Pattern - 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
PathElelements. - 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.
- Text
Style - Controls how text is rendered: size, color, weight, font, and alignment.
Enums§
- Font
Weight - Font weight selector.
- HAlign
- Horizontal text alignment.
- PathEl
- A single element within a
Path. - Stroke
Cap - The shape applied at the endpoints of an open sub-path.
- Stroke
Join - The shape applied at the join between two path segments.
- VAlign
- Vertical text alignment.