AnchorHints

class AnchorHints

Positioning hints for aligning a surface relative to a rectangle.

These hints determine how the surface should be positioned in the case that the surface would fall off-screen if placed in its ideal position.

For example, FLIP_X will replace NORTH_WEST with NORTH_EAST and vice versa if the surface extends beyond the left or right edges of the monitor.

If SLIDE_X is set, the surface can be shifted horizontally to fit on-screen. If RESIZE_X is set, the surface can be shrunken horizontally to fit.

In general, when multiple flags are set, flipping should take precedence over sliding, which should take precedence over resizing.

Fields

class AnchorHints
FLIP

Allow flipping anchors on both axes

FLIP_X

Allow flipping anchors horizontally

FLIP_Y

Allow flipping anchors vertically

RESIZE

Allow resizing surface on both axes

RESIZE_X

Allow resizing surface horizontally

RESIZE_Y

Allow resizing surface vertically

SLIDE

Allow sliding surface on both axes

SLIDE_X

Allow sliding surface horizontally

SLIDE_Y

Allow sliding surface vertically