* Returns an array of points outlining a string of text written using the * font. * * Each point object in the array has three properties that describe the * point's location and orientation, called its path angle. For example, * `{ x: 10, y: 20, alpha: 450 }`. * * The first par
(str, x, y, width, height, options)
| 263 | * } |
| 264 | */ |
| 265 | textToPoints(str, x, y, width, height, options) { |
| 266 | // By segmenting per contour, pointAtLength becomes much faster |
| 267 | const contourPoints = this.textToContours( |
| 268 | str, |
| 269 | x, y, |
| 270 | width, height, |
| 271 | options |
| 272 | ); |
| 273 | return contourPoints.reduce((acc, next) => { |
| 274 | acc.push(...next); |
| 275 | return acc; |
| 276 | }, []); |
| 277 | } |
| 278 | |
| 279 | /** |
| 280 | * Returns an array of arrays of points outlining a string of text written using the |
no test coverage detected