Skip to content

Function: rectCoverage() ​

ts
function rectCoverage(px, py, g, cornerRadius, pixelRatio): RectCoverage;

Experimental

CPU mirror of the fragment shader: anti-aliased coverage at screen point (px, py) (CSS px) for a rect placed by rectScreenGeometry. The AA ramp is one device pixel centred on the edge.

Parameters ​

ParameterType
pxnumber
pynumber
gRectScreenGeometry
cornerRadiusnumber
pixelRationumber

Returns ​

RectCoverage

Released under the MIT License.