• OctoMY API
  • OctoMY API Reference
  • C++ Classes
  • OctoMY
  • Frame
  • paint::Frame Class

    class paint::Frame

    One still image of a paint::Layer: a sparse grid of pixel chunks. More...

    Header: #include <Frame>
    Since: 1.0

    Detailed Description

    A Frame keeps its pixels as chunks, keyed by their chunk coordinate. Only the chunks that hold paint exist. ensureChunk() creates a chunk on first use, with the owner that claims it. Each chunk carries a trailer with its owner, a BLAKE3 hash of its body, and a signature that V1 leaves empty. The hash is the same content address the swarm store uses.

    toStream() and fromStream() write and read the chunks in coordinate order, so a round trip gives the same bytes. toStream() computes each hash again. A layer owns its frames through shared pointers. In V1 a layer always has exactly one frame; the type exists for animation.

    See also paint::Layer.