MD

Paint Document

canonical/paint-document.md

Paint Document

Purpose

A Paint document represents a drawing document owned by Paint.

Paint document identity is stable. The document record points to immutable Resources that contain the current editable source state and preview image.

Ownership

Paint owns:

Storage owns:

World owns placement and composition. Runtimes own presentation.

Object Type

The canonical Object type is:

paint.document

Structure

A Paint document Object contains:

Example:

{
  "id": "paint.document:...",
  "type": "paint.document",
  "title": "Untitled Paint",
  "summary": "Paint document",
  "content": {
    "name": "Untitled Paint",
    "description": "Paint document",
    "width": 1024,
    "height": 768,
    "source_resource": "resource:...",
    "preview_resource": "resource:...",
    "surface": {
      "mode": "hosted",
      "service": "paint",
      "kind": "editor",
      "resources": {
        "source": "resource:...",
        "preview": "resource:..."
      }
    }
  },
  "resources": [
    "resource:...",
    "resource:..."
  ]
}

Source Resource

The source Resource stores editable Paint state as JSON.

The media type is:

application/vnd.elonn.paint+json

Initial content:

{
  "width": 1024,
  "height": 768,
  "operations": []
}

The source Resource is immutable. Editing a Paint document creates a new source Resource.

Preview Resource

The preview Resource stores the current preview image.

The initial preview is a transparent PNG. Later preview generation may replace the current preview reference with a new preview Resource.

The preview Resource is immutable.

Characteristics