Overlayable.getAnchor

An anchor the node is bound to, used for positioning the overlay.

The overlay should be aligned to one of the rectangle's corners or edges, so that a point in the node's rectangle should lie in the outline of the anchor. The node's layout property can be used for this:

* For a (start, start) alignment, the point should be in the *top-left* corner of the overlay. * For an (end, end) alignment, the point should lie in the *bottom-right* corner. * An alignment value of center places the point in the *center* on the specified axis. * The special value *fill* can be used to mean automatic alignment; use an alignment that is the best fit for the available space.

Even for overlays that are outside of the window's boundary, the rectangle should be in window space, so that (0,0) is the window's top-left corner.

interface Overlayable
const nothrow
getAnchor

Parameters

space Rectangle

Space available for the overlay, within which the anchor should be placed. This may be the screen (relative to the window's position), the window itself, or a fragment of the window.

Return Value

Type: Rectangle

The anchor rectangle to use for positioning the node.

Meta