1 #ifndef __ANCHOR_POINT_HPP__
2 #define __ANCHOR_POINT_HPP__
5 #include "math/vector.hpp"
10 ANCHOR_H_MASK = 0x00f0,
12 ANCHOR_BOTTOM = 0x0020,
13 ANCHOR_V_MASK = 0x000f,
15 ANCHOR_RIGHT = 0x0002,
16 ANCHOR_MIDDLE = 0x0000,
18 ANCHOR_TOP_LEFT = ANCHOR_TOP | ANCHOR_LEFT,
19 ANCHOR_TOP_RIGHT = ANCHOR_TOP | ANCHOR_RIGHT,
20 ANCHOR_BOTTOM_LEFT = ANCHOR_BOTTOM | ANCHOR_LEFT,
21 ANCHOR_BOTTOM_RIGHT = ANCHOR_BOTTOM | ANCHOR_RIGHT,
24 std::string anchor_point_to_string(AnchorPoint point);
25 AnchorPoint string_to_anchor_point(const std::string& str);
26 Vector get_anchor_pos(const Rect& rect, AnchorPoint point);
27 Vector get_anchor_pos(const Rect& destrect, float width, float height,