CONTROL:get_resolved_bounds
CONTROL:get_resolved_bounds()
Computes the resolved bounds for this control. The resolved bounds are the bounds of this control in the parent's coordinate system.
This is a combination of the fixed-position, fixed-size, scaled-position and scaled-size properties as follows:
- The parent size is the resolved size of the parent, reduced by the parent's padding. The bounds for each parent are computed top-down in order to compute the resolved bounds.
resolved_x = x + (sx * parent_width)
resolved_y = y + (sy * parent_height)
resolved_width = w + (sw * parent_width)
resolved_height = h + (sh * parent_height)
-
Anchors define how the resolved position is adjusted according to the control’s bounds.
-
gre.LEFTandgre.TOPanchors will not affect the x/y position. -
gre.CENTERanchors will adjust the x/y position by half the resolved width/height. -
gre.RIGHTandgre.BOTTOManchors will adjust the x/y position by the resolved width/height.
-
Returns
| Type | Description |
|---|---|
#number | The x-coordinate of the control's resolved bounds. |
#number | The y-coordinate of the control's resolved bounds. |
#number | The width of the control's resolved bounds. |
#number | The height of the control's resolved bounds. |