* change the font display size * @param {number} scale - ratio * @returns {BitmapText} this object for chaining
(scale)
| 323 | * @returns {BitmapText} this object for chaining |
| 324 | */ |
| 325 | resize(scale) { |
| 326 | this.fontScale.set(scale, scale); |
| 327 | |
| 328 | // remeasure with new scale (cached for updateBounds) |
| 329 | this.metrics.measureText(this._text); |
| 330 | this.updateBounds(); |
| 331 | |
| 332 | this.isDirty = true; |
| 333 | |
| 334 | return this; |
| 335 | } |
| 336 | |
| 337 | /** |
| 338 | * measure the given text size in pixels |
no test coverage detected