Skip to main content
Version: 9.0.2

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.LEFT and gre.TOP anchors will not affect the x/y position.

    • gre.CENTER anchors will adjust the x/y position by half the resolved width/height.

    • gre.RIGHT and gre.BOTTOM anchors will adjust the x/y position by the resolved width/height.

Returns

TypeDescription
#numberThe x-coordinate of the control's resolved bounds.
#numberThe y-coordinate of the control's resolved bounds.
#numberThe width of the control's resolved bounds.
#numberThe height of the control's resolved bounds.