Types

Configuration Types

BlobBoards.PatternConfig — Type
PatternConfig

Deterministic configuration for pattern generation.

Fields (selected)

  • pattern_resolution::Size2: logical size of the pattern region
  • min_scale: minimum σ (in logical units)
  • max_scale: maximum σ (in logical units) — the top of the scale ladder, exact (see calc_blob_scales). The constructor keyword's nothing (its default) stores a disc diameter of 20% of the short side; the field is always a σ. Users give sizes through blob_sizes (printed disc diameters) on blob_pattern/blob_board; this struct stores only σ in px (schema v2).
  • seed::UInt64: RNG seed for reproducibility
  • pixel_type: requested output colorant type (e.g. Gray{N0f16})
  • polarity::Symbol: blob polarity (:dark for dark blobs on light background, :light for light blobs on dark background)
source
BlobBoards.BoardConfig — Type
BoardConfig

A board's physical configuration.

It holds the canvas, the board, the frame's marks and the ruler, in physical units (e.g. mm or inch), and the layout_grid the board is laid out on (PointGrid(), the default, for every new board; a stored schema ≤ v3 board reads as PixelGrid(density)). The board is centred on the canvas: its margin is a Size2 (width: left and right of the board, height: above and below it), DEFAULT_BOARD_MARGIN (10 mm) on every side by default, so office printers' unprintable borders miss the board, and board_size is the canvas less twice the margin. Give either margin or board_size (its margin is then half the canvas's excess), not both; a zero margin is full bleed. A point-grid (v4) board records its margin and derives its board, so the two cannot disagree; a stored v3 board keeps the board_size it recorded. The marks are switched by their sizes: corner_size (the corner cells, QR code and uid) and ruler_width (the ruler bands), 10 mm each by default, a zero length turning a mark off. The print density of a new board is not part of its configuration — the layout does not depend on it; it is a property of a print or raster conversion, recorded with the render.

frame_style is a stored v3 board's (:ruler, or :none: a blank band) and is not a keyword of a new one: its :ruler or :none says whether the ruler is on.

source
BlobBoards.BoardPreamble — Type
BoardPreamble

Metadata for a board, bundling the physical BoardConfig and the embedded PatternConfig used to render the pattern region.

source

Bundle Types

BlobBoards.PatternBundle — Type
PatternBundle <: AbstractBundle

Container returned by blob_pattern with configuration and blob list.

Fields:

  • pattern_config::PatternConfig
  • blobs::Vector{Disc}
source
BlobBoards.BoardBundle — Type
BoardBundle <: AbstractBundle

Container returned by blob_board: the preamble and the placed blobs.

Fields:

  • preamble::BoardPreamble
  • blobs::Vector{Disc} - blob locations in the board's stored unit (COLMAP convention: the grid's corner at 0)

Blobs are stored in the :pattern reference frame, in the board's stored unit (stored_density): points on a v4 (point-grid) board, printer pixels on a stored v3 board. Use blobs(bundle, reference_frame; units=mm) to extract them in other frames or units, or units = px with a density for pixels.

source

Layout Types

BlobBoards.BoardLayout — Type
BoardLayout

A board's layout in whole units of its grid (LayoutGrid): canvas, board, pattern, corner and band sizes, the pattern's inset from the board's edge, and the margins.

A point-grid (v4) board's pattern IS the board: the frame's marks (corner cells, ruler bands) are reserved rectangles on it, which placement keeps clear of (_frame_marks, _keepouts). A stored v3 board's pattern is inset by its band, as it was laid out.

The margin field is a 4-tuple (left, right, bottom, top) in whole grid units: the white margin of the sheet on each side of the board.

source

Ruler Types

BlobBoards.RulerTick — Type
RulerTick{T}

Tick specification for a printed ruler. Fields

  • spacing::T: center-to-center distance between ticks
  • width::T: the tick's full drawn length across the frame band (physical)
source
BlobBoards.RulerSpec — Type
RulerSpec{RT<:RulerTick}

Ruler specification: the major_tick and minor_tick spacings and widths.

A tick's width is its FULL drawn length across the ruler band, in physical units, centred in the band. BoardConfig's defaults (major = the padded band ruler_width − 2·frame_padding, minor = half of it) fill the band with major ticks. Requires 0 < minor ≤ major ≤ ruler_width − 2·frame_padding (checked by BoardConfig while the ruler is on).

Schema: board bundles before blobboards/board/v3 stored a third field, width (the "ruler width"), and HALF-extent tick widths; the migration to v5 (migrate_boards.jl) drops that field and doubles the tick widths, which reproduces exactly the ruler those boards were drawn with. The stored hashes.config stays their identity.

source

Constants

BlobBoards.PRINT_SIZES — Constant
PRINT_SIZES

Mapping of common paper sizes (ISO/ANSI names) to physical Size2 dimensions. Use with blob_board(paper_size::String, ...).

source

UID Generation

BlobBoards.hash_config — Function
hash_config(config)

Hash a configuration (PatternConfig or BoardPreamble) — SHA-256 over the canonical v1 encoding (canonical_config_json); full hex string. A point-grid board's identity also covers its schema and the blobs its configuration places (placement runs to compute it), so a rebuild that places different blobs has a different identity.

Minting only: identities of existing boards come from their STORED hashes.config (authoritative on load), never from recomputation.

source