(5.5.0) scribble_get_bbox - JujuAdams/ScribbleOldDocs GitHub Wiki

scribble_get_bbox(string/textElement, x, y, [leftPad], [topPad], [rightPad], [bottomPad])

Returns: 6-element array containing the positions of the axis-aligned bounding box for a text element

Argument Name Purpose
0 string/textElement Either:1. A string2. A previously created text element
1 x x-position in the room to draw at
2 y y-position in the room to draw at
[3] [leftPad] Extra space on the left-hand side of the textbox. Positive values create more space. Defaults to 0
[4] [topPad] Extra space on the top of the textbox. Positive values create more space. Defaults to 0
[5] [rightPad] Extra space on the right-hand side of the textbox. Positive values create more space. Defaults to 0
[6] [bottomPad] Extra space on the bottom of the textbox. Positive values create more space. Defaults to 0

The padding arguments can be given the value undefined to indicate that the default value should be used.

The array returned by scribble_get_bbox() has 6 elements as defined by the enum SCRIBBLE_BBOX.