Creates an all-lowered raster.
Number of pins across
Number of pins down
ReadonlywidthNumber of pins across.
ReadonlyheightNumber of pins down.
Number of raised pins. Used to decide whether a frame is worth sending and to pick between outline and fill when a mark is too small for both.
Raises or lowers a single pin. Coordinates outside the buffer are ignored, so callers may draw shapes that run off the edge without clipping first.
Dot column
Dot row
True to raise the pin, false to lower it
Reads a single pin. Coordinates outside the buffer read as lowered.
Dot column
Dot row
Lowers every pin.
Reports whether every pin is lowered.
Draws a horizontal run of pins.
Starting dot column (inclusive)
Ending dot column (inclusive)
Dot row
True to raise, false to lower
Draws a vertical run of pins.
Dot column
Starting dot row (inclusive)
Ending dot row (inclusive)
True to raise, false to lower
Draws a straight line between two points using Bresenham's algorithm, one pin thick.
Start dot column
Start dot row
End dot column
End dot row
True to raise, false to lower
Connects a run of points with straight segments.
Points in dot coordinates
True to raise, false to lower
Connects a run of points with a stroke several pins wide.
A one-pin stroke is at the floor of what a fingertip resolves, and a diagonal one is below it: Bresenham steps a shallow diagonal in single pins that touch only at their corners, so a finger sweeping across meets a row of separate bumps rather than a line, and loses the trail whenever it drifts by a pin. Widening the stroke is what turns a run of bumps into something that can be followed.
Drawn as repeated offset passes rather than as a thick-line primitive: the grid is binary, so a union of one-pin strokes is exactly a wide stroke, and it costs a few passes over an area the size of a postcard.
The offsets are perpendicular to each segment, and only perpendicular. An earlier version offset along both axes at once, on the reasoning that a path may run in any direction and the pass that does not thicken it costs nothing. It costs the width: offsetting a diagonal by a pin in x and again in y lands on four distinct columns per row, so a stroke asked for at two pins arrived at four. A line chart came back as a band a fingertip could not find an edge of, which is most of what a line is for.
Points in dot coordinates
Pins across the stroke; 1 draws a plain polyline
True to raise, false to lower
Fills the interior of one or more closed rings using the even-odd rule.
Rings are filled together rather than one at a time so a shape with a hole — a donut wedge, a glyph counter — keeps its hole instead of having it painted over by a later ring.
Closed rings in dot coordinates; each is an implicitly closed sequence of points
True to raise, false to lower
Fills rings with a texture whose crowding stands for a value.
The pin grid has two states, so a value a chart drew as a colour has nowhere else to go. Density is the substitute a hand can read: a heatmap cell, a choropleth region, a hexbin cell and a mosaic tile are all the same size and shape as their neighbours, so without this the display carries their lattice and none of their numbers.
Closed rings in dot coordinates
How much of the interior to raise, 0 to 1
Raises a filled disc.
For a mark with no interior of its own — a scatter point, a line's vertex — where the focus has to read as a separate object rather than as a thickening of the stroke it sits on.
Centre, in dot coordinates
Centre, in dot coordinates
Radius in pins
Reports whether two rasters hold identical pin states. Used to skip a transmission when a navigation move did not change the picture.
The raster to compare against
Copies the buffer.
Renders the buffer as text, one character per pin, for tests and debugging.
Character for a raised pin
Character for a lowered pin
A monochrome pin buffer sized to a tactile display's graphic area.
Every pin is a single bit — raised or lowered. There is no grey, so a renderer targeting this buffer works in outlines and solid fills rather than in shading, and any anti-aliasing it might want has nowhere to go.
Coordinates are dot coordinates with the origin at the top-left pin,
xincreasing to the right andyincreasing downward, matching the order the DotPad hardware itself scans its cells.