pub.leaflet.blocks.drawing

Freehand ink strokes. The view box is the area of drawing space the block shows, scaled to the block's width; strokes may reach past it.

Repository @leaflet.pub did:plc:btxrwcaeyodrap5mnjw2fvmz namespace authority
Details · object
Kindobject
Authorityblocks.leaflet.pub
Indexed

Object

object

Properties

fills

array

Painted in order, beneath the strokes.

itemsref
Reference

strokes

requiredarray
itemsref
Reference

viewBox

requiredref
Reference

#fill

object

A filled polygon, painted with the nonzero rule: the region a stroke encloses.

Properties

color

requiredstring

A CSS hex color, or one of the document theme's colors: primary (text), accent, or tertiary (faded text).

points

requiredarray

Flattened vertices as x, y pairs in drawing space. The last joins back to the first.

itemsinteger

#stroke

object

One pen stroke, drawn in order, rendered as a variable-width outline of its input points (as perfect-freehand does).

Properties

color

requiredstring

A CSS hex color, or one of the document theme's colors: primary (text), accent, or tertiary (faded text).

points

requiredarray

Flattened input points as x, y, pressure triples: x and y in drawing space, pressure from 0 to 1000.

itemsinteger

The input had no real pressure (a mouse or finger); derive it from the stroke's speed instead.

size

requiredinteger

The stroke's base diameter in drawing space.

  • minimum: 1

#viewBox

object

Properties

height

requiredinteger
  • minimum: 1

width

requiredinteger
  • minimum: 1

x

requiredinteger

y

requiredinteger

Similar lexicons

semantic match

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.

  • A drawing block — a vector image composed of shapes that render onto an HTML canvas 2D context. The drawing's `shapes` sequence holds shape block ids in z-order (later = on top). Each shape variant below is its own block. Coordinates are integer pixels; an editor that needs sub-pixel precision can scale its working coord space.