string of text
Optionalx: numberx coordinate of the text position
Optionaly: numbery coordinate of the text position
OptionalsampleRate: numberlower values increase dithering (1 = all points, 0.1 = ~10% of points)
Optionaldensity: numberpixel density of the text
📘 Converts a string of text to an array of points.
Samples opaque pixels in a text image made with
createTextImage.It's influenced by text settings, such as font, size, and alignment.
Uses a Z-order curve to improve spatial distribution, which preserves the shape of text better than purely random sampling.