string of text
Optionalx: number
x coordinate of the text position
Optionaly: number
y coordinate of the text position
OptionalsampleRate: number
lower values increase dithering (1 = all points, 0.1 = ~10% of points)
Optionaldensity: number
pixel 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.