page.corvus.drawing

corvus.page

Documentation

A drawing canvas containing an ordered sequence of shapes

main object

A drawing canvas containing an ordered sequence of shapes

Properties

background ref page.corvus.core#register Optional

The canvas background as a CSS color string; omitted or empty for transparent

blockId string at-uri Required

The AT-URI of this block record

shapes ref page.corvus.core#sequence Optional

The shapes in the drawing as a sequence of shape block ids in z-order (later = on top)

View raw schema
{
  "type": "object",
  "required": [
    "blockId"
  ],
  "properties": {
    "title": {
      "ref": "page.corvus.core#sequence",
      "type": "ref",
      "description": "The name of the drawing"
    },
    "width": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "The canvas width in pixels"
    },
    "height": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "The canvas height in pixels"
    },
    "shapes": {
      "ref": "page.corvus.core#sequence",
      "type": "ref",
      "description": "The shapes in the drawing as a sequence of shape block ids in z-order (later = on top)"
    },
    "blockId": {
      "type": "string",
      "format": "at-uri",
      "description": "The AT-URI of this block record"
    },
    "background": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "The canvas background as a CSS color string; omitted or empty for transparent"
    }
  },
  "description": "A drawing canvas containing an ordered sequence of shapes"
}
ellipse object

An ellipse or circle (set rx == ry for a circle)

Properties

blockId string at-uri Required

The AT-URI of this block record

View raw schema
{
  "type": "object",
  "required": [
    "blockId"
  ],
  "properties": {
    "cx": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Center X coordinate in pixels"
    },
    "cy": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Center Y coordinate in pixels"
    },
    "rx": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "X radius in pixels"
    },
    "ry": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Y radius in pixels"
    },
    "fill": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Fill style as a CSS color string; omitted or empty for no fill"
    },
    "stroke": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Stroke style as a CSS color string; omitted or empty for no stroke"
    },
    "blockId": {
      "type": "string",
      "format": "at-uri",
      "description": "The AT-URI of this block record"
    },
    "opacity": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Opacity from 0 to 1 (defaults to 1)"
    },
    "rotation": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Rotation in radians around (cx, cy) (defaults to 0)"
    },
    "strokeWidth": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Stroke width in pixels (defaults to 1)"
    }
  },
  "description": "An ellipse or circle (set rx == ry for a circle)"
}
group object

A named collection of shape block ids — a tag that lets a set of shapes be referred to together (selected, named, toggled). Membership is order-independent; z-order comes from #main.shapes

Properties

blockId string at-uri Required

The AT-URI of this block record

View raw schema
{
  "type": "object",
  "required": [
    "blockId"
  ],
  "properties": {
    "name": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "The display name of the group"
    },
    "shapes": {
      "ref": "page.corvus.core#set",
      "type": "ref",
      "description": "The set of member shape block ids"
    },
    "blockId": {
      "type": "string",
      "format": "at-uri",
      "description": "The AT-URI of this block record"
    }
  },
  "description": "A named collection of shape block ids — a tag that lets a set of shapes be referred to together (selected, named, toggled). Membership is order-independent; z-order comes from #main.shapes"
}
image object

A placed image — positions and sizes a page.corvus.contentBlocks#image within the drawing. The image asset itself lives in the referenced block (its blob, alt text, and aspect ratio); this variant only carries the placement

Properties

blockId string at-uri Required

The AT-URI of this block record

image ref page.corvus.core#register Optional

Register whose value is the at-uri of the page.corvus.contentBlocks#image block to render

View raw schema
{
  "type": "object",
  "required": [
    "blockId"
  ],
  "properties": {
    "x": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Top-left X coordinate in pixels"
    },
    "y": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Top-left Y coordinate in pixels"
    },
    "image": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Register whose value is the at-uri of the page.corvus.contentBlocks#image block to render"
    },
    "width": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Width in pixels"
    },
    "height": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Height in pixels"
    },
    "blockId": {
      "type": "string",
      "format": "at-uri",
      "description": "The AT-URI of this block record"
    },
    "opacity": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Opacity from 0 to 1 (defaults to 1)"
    },
    "rotation": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Rotation in radians around the image's center (defaults to 0)"
    }
  },
  "description": "A placed image — positions and sizes a page.corvus.contentBlocks#image within the drawing. The image asset itself lives in the referenced block (its blob, alt text, and aspect ratio); this variant only carries the placement"
}
path object

A vector path — a sequence of commands that map directly to canvas path operations. Commands are inline values in the sequence and have no stable identity across edits (editing a command means deleting and re-inserting it). Use #stroke instead for freehand brush traces.

Properties

blockId string at-uri Required

The AT-URI of this block record

View raw schema
{
  "type": "object",
  "required": [
    "blockId"
  ],
  "properties": {
    "x": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Origin X offset applied to the path at render time (defaults to 0)"
    },
    "y": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Origin Y offset applied to the path at render time (defaults to 0)"
    },
    "fill": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Fill style as a CSS color string; omitted or empty for no fill"
    },
    "stroke": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Stroke style as a CSS color string; omitted or empty for no stroke"
    },
    "blockId": {
      "type": "string",
      "format": "at-uri",
      "description": "The AT-URI of this block record"
    },
    "opacity": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Opacity from 0 to 1 (defaults to 1)"
    },
    "commands": {
      "ref": "page.corvus.core#sequence",
      "type": "ref",
      "description": "The path commands as an RGA sequence of #pathCommand objects"
    },
    "rotation": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Rotation in radians applied around (x, y) at render time (defaults to 0)"
    },
    "strokeWidth": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Stroke width in pixels (defaults to 1)"
    }
  },
  "description": "A vector path — a sequence of commands that map directly to canvas path operations. Commands are inline values in the sequence and have no stable identity across edits (editing a command means deleting and re-inserting it). Use #stroke instead for freehand brush traces."
}
pathCommand object

A single path command. Used inline as a value in a #path.commands sequence — NOT its own block, NOT addressable, no stable identity across edits

Properties

coords array of integer Optional

Coordinate arguments; interpretation depends on op. Angles for the A command are encoded in milliradians (0 to 2π × 1000) so they fit an integer

op string Required

M=moveTo (x,y); L=lineTo (x,y); C=bezierCurveTo (cp1x,cp1y,cp2x,cp2y,x,y); Q=quadraticCurveTo (cpx,cpy,x,y); A=arc (cx,cy,r,startAngle,endAngle,counterclockwise); Z=closePath (no coords)

Known values: M, L, C, Q, A, Z
View raw schema
{
  "type": "object",
  "required": [
    "op"
  ],
  "properties": {
    "op": {
      "type": "string",
      "description": "M=moveTo (x,y); L=lineTo (x,y); C=bezierCurveTo (cp1x,cp1y,cp2x,cp2y,x,y); Q=quadraticCurveTo (cpx,cpy,x,y); A=arc (cx,cy,r,startAngle,endAngle,counterclockwise); Z=closePath (no coords)",
      "knownValues": [
        "M",
        "L",
        "C",
        "Q",
        "A",
        "Z"
      ]
    },
    "coords": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "description": "Coordinate arguments; interpretation depends on op. Angles for the A command are encoded in milliradians (0 to 2π × 1000) so they fit an integer"
    }
  },
  "description": "A single path command. Used inline as a value in a #path.commands sequence — NOT its own block, NOT addressable, no stable identity across edits"
}
rect object

An axis-aligned rectangle, optionally rotated around its center

Properties

blockId string at-uri Required

The AT-URI of this block record

View raw schema
{
  "type": "object",
  "required": [
    "blockId"
  ],
  "properties": {
    "x": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Top-left X coordinate in pixels"
    },
    "y": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Top-left Y coordinate in pixels"
    },
    "fill": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Fill style as a CSS color string; omitted or empty for no fill"
    },
    "width": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Width in pixels"
    },
    "height": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Height in pixels"
    },
    "stroke": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Stroke style as a CSS color string; omitted or empty for no stroke"
    },
    "blockId": {
      "type": "string",
      "format": "at-uri",
      "description": "The AT-URI of this block record"
    },
    "opacity": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Opacity from 0 to 1 (defaults to 1)"
    },
    "rotation": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Rotation in radians around the rect's center (defaults to 0)"
    },
    "strokeWidth": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Stroke width in pixels (defaults to 1)"
    },
    "cornerRadius": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Corner radius in pixels (defaults to 0)"
    }
  },
  "description": "An axis-aligned rectangle, optionally rotated around its center"
}
stroke object

A freehand stroke — a brush trace captured atomically. Sample points are written once as a single register value; individual points are not edited collaboratively. To redo the stroke, replace the points register

Properties

blockId string at-uri Required

The AT-URI of this block record

points ref page.corvus.core#register Optional

The stroke's samples as a single register whose value is an array of #strokePoint objects

View raw schema
{
  "type": "object",
  "required": [
    "blockId"
  ],
  "properties": {
    "x": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Origin X offset applied to the stroke at render time (defaults to 0)"
    },
    "y": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Origin Y offset applied to the stroke at render time (defaults to 0)"
    },
    "color": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Brush color as a CSS color string"
    },
    "width": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Brush width in pixels (base width if pressure modulates)"
    },
    "points": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "The stroke's samples as a single register whose value is an array of #strokePoint objects"
    },
    "blockId": {
      "type": "string",
      "format": "at-uri",
      "description": "The AT-URI of this block record"
    },
    "opacity": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Opacity from 0 to 1 (defaults to 1)"
    },
    "rotation": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Rotation in radians applied around (x, y) at render time (defaults to 0)"
    }
  },
  "description": "A freehand stroke — a brush trace captured atomically. Sample points are written once as a single register value; individual points are not edited collaboratively. To redo the stroke, replace the points register"
}
strokePoint object

A single sample within a #stroke. Used inline as an element of #stroke.points

Properties

pressure integer Optional

Optional pen pressure, 0-255 (0 = lift, 255 = max)

minimum: 0maximum: 255
x integer Required

X coordinate in pixels

y integer Required

Y coordinate in pixels

View raw schema
{
  "type": "object",
  "required": [
    "x",
    "y"
  ],
  "properties": {
    "x": {
      "type": "integer",
      "description": "X coordinate in pixels"
    },
    "y": {
      "type": "integer",
      "description": "Y coordinate in pixels"
    },
    "pressure": {
      "type": "integer",
      "maximum": 255,
      "minimum": 0,
      "description": "Optional pen pressure, 0-255 (0 = lift, 255 = max)"
    }
  },
  "description": "A single sample within a #stroke. Used inline as an element of #stroke.points"
}
text object

A text label rendered with canvas fillText/strokeText

Properties

align ref page.corvus.core#register Optional

Horizontal alignment relative to (x, y) — 'left', 'center', or 'right' (defaults to 'left')

blockId string at-uri Required

The AT-URI of this block record

View raw schema
{
  "type": "object",
  "required": [
    "blockId"
  ],
  "properties": {
    "x": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Anchor X coordinate in pixels"
    },
    "y": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Anchor Y coordinate in pixels (text baseline)"
    },
    "fill": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Fill style as a CSS color string; omitted or empty for no fill"
    },
    "text": {
      "ref": "page.corvus.core#sequence",
      "type": "ref",
      "description": "The text content as a text sequence (editable per-character)"
    },
    "align": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Horizontal alignment relative to (x, y) — 'left', 'center', or 'right' (defaults to 'left')"
    },
    "stroke": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Stroke style as a CSS color string; omitted or empty for no stroke"
    },
    "weight": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Font weight as a CSS font-weight value"
    },
    "blockId": {
      "type": "string",
      "format": "at-uri",
      "description": "The AT-URI of this block record"
    },
    "opacity": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Opacity from 0 to 1 (defaults to 1)"
    },
    "fontSize": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Font size in pixels"
    },
    "rotation": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Rotation in radians around (x, y) (defaults to 0)"
    },
    "fontFamily": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Font family as a CSS font-family string"
    },
    "strokeWidth": {
      "ref": "page.corvus.core#register",
      "type": "ref",
      "description": "Stroke width in pixels (defaults to 0)"
    }
  },
  "description": "A text label rendered with canvas fillText/strokeText"
}

Lexicon Garden

@