
The Ultimate QR Editor
Helpers for sorting possible encodings
Finds the max-cover of shapes
that fits into grid
with no overlaps. Uses a modified version of the Dancing Links algorithm by Donald Knuth.
Returns { score, placements, used, unused }
score
: number of shapes that were placedplacements
: array of shapes and their coordinatesused
: a Grid
of tiles covered by placements
unused
: a Grid
of tiles not covered by placements
Returns all possible fits of a given shape (overlapping).
Returns [{ shape, coords: {x,y} }]
Returns shapes
Outlines a shape's perimeter for smooth drawing.
Returns paths
: an array of array of segments [x,y,type]
. The first path is the outer path, the rest of the paths are holes.