Skip to content

1681-engine / pixel / complement

Function: complement() ​

ts
function complement(
   w, 
   h, 
   holes
): SwayRect[];

Defined in: src/pixel/swayRig.ts:99

The frame wxh less the given rects (which must not overlap), as rects: cut into row bands at every rect's top and bottom, and each band into the runs no rect covers.

Parameters ​

ParameterType
wnumber
hnumber
holesSwayRect[]

Returns ​

SwayRect[]

Released under the MIT License.