the parent object that contains this TextMetrics object
a reference to the parent object that contains this TextMetrics object
Gets the bottom coordinate of the bounds.
The bottom coordinate.
Gets the center position of the bounds on the x axis.
The center x coordinate.
Gets the center position of the bounds on the y axis.
The center y coordinate.
Gets the height of the bounds.
The height.
Sets the height of the bounds.
The new height.
Gets the left coordinate of the bounds.
The left coordinate.
Gets the right coordinate of the bounds.
The right coordinate.
Gets the top coordinate of the bounds.
The top coordinate.
Gets the width of the bounds.
The width.
Sets the width of the bounds.
The new width.
Gets the x position of the bounds.
The x position.
Sets the x position of the bounds.
The new x position.
Gets the y position of the bounds.
The y position.
Sets the y position of the bounds.
The new y position.
Adds the given bounds to the bounds definition.
The bounds to add.
Optional
clear: boolean = falseWhether to reset the bounds before adding the new bounds.
Adds the given quad coordinates to this bounds definition, multiplied by the given matrix.
The left x coordinate of the quad.
The top y coordinate of the quad.
The right x coordinate of the quad.
The bottom y coordinate of the quad.
Optional
m: Matrix2dAn optional transform to apply to the given coordinates.
Centers the bounds position around the given coordinates.
The x coordinate to center around.
The y coordinate to center around.
The current Bounds instance for method chaining.
Returns the width of the given segment of inline text in CSS pixels.
the text to be measured
Optional
context: CanvasRenderingContext2Dreference to an active 2d context for canvas rendering
the width of the given segment of inline text in CSS pixels.
measure the given text size in CSS pixels
the text to be measured
Optional
context: CanvasRenderingContext2Dreference to an active 2d context for canvas rendering
this
Returns true if the two bounds intersect.
The bounds to check for intersection.
True if the bounds overlap, otherwise false.
Shifts the bounds to the given x, y position or vector.
Optional
y: numberThe y coordinate if the first parameter is a number.
Translates the bounds by the given point or vector.
Optional
y: numberThe y coordinate if the first parameter is a number.
wrap the given text based on the given width
the text to be wrapped
maximum width of one segment of text in css pixel
Optional
context: CanvasRenderingContext2Dreference to an active 2d context for canvas rendering
an array of string representing wrapped text
a Text Metrics object that contains helper for text manipulation