跳转至

Anchor Flags

Module: Rectangle Operations / Rectangle Normalization

Flags for specifying rectangle alignment anchors.

Types

Name
enum CCGraphicAnchor { RECT_ANCHOR_LEFT = 1 << 0, RECT_ANCHOR_HCENTER = 1 << 1, RECT_ANCHOR_RIGHT = 1 << 2, RECT_ANCHOR_TOP = 1 << 3, RECT_ANCHOR_VCENTER = 1 << 4, RECT_ANCHOR_BOTTOM = 1 << 5}
Defines anchor points for rectangle alignment operations.

Types Documentation

enum CCGraphicAnchor

Enumerator Value Description
RECT_ANCHOR_LEFT 1 << 0 Align to left edge (horizontal)
RECT_ANCHOR_HCENTER 1 << 1 Align to horizontal center
RECT_ANCHOR_RIGHT 1 << 2 Align to right edge (horizontal)
RECT_ANCHOR_TOP 1 << 3 Align to top edge (vertical)
RECT_ANCHOR_VCENTER 1 << 4 Align to vertical center
RECT_ANCHOR_BOTTOM 1 << 5 Align to bottom edge (vertical)

Defines anchor points for rectangle alignment operations.

These flags specify horizontal and vertical anchor positions. Use bitwise OR to combine one horizontal and one vertical flag.


Updated on 2026-02-03 at 13:21:55 +0000