readPixel constant

String const readPixel

Reads the captured value at one point, as exact 32-bit floats.

Parameters: asset, stamp, and x and y in the shader's coordinates (what FlutterFragCoord() returns there). Optionally instance, from a ServiceEvents.pixelPicked event, picks which DebugShader for the asset supplies the uniforms; by default, the first one. Answers {"applied": true, "value": [x, y, z, w], "exact": bool}, or applied false with a reason, as showHeatmap does. Components that are not finite come as the strings NaN, Infinity and -Infinity. exact is false when the renderer cannot draw into a 32-bit float image (Skia, the engine flutter test uses): the value is then rounded to 8 bits per channel and clamped to 0..1.

Implementation

static const String readPixel = '$prefix.readPixel';