11#ifndef INCGUARD_MGL_ALIGNMENT_H_1625900468
12#define INCGUARD_MGL_ALIGNMENT_H_1625900468
96 adjustedPosition.
x += baseSize.x * 0.5f;
100 adjustedPosition.
x += baseSize.x;
110 adjustedPosition.
y += baseSize.y * 0.5f;
114 adjustedPosition.
y += baseSize.y;
118 return adjustedPosition;
138 adjustedPosition.
x -= rectangle.width * 0.5f;
142 adjustedPosition.
x -= rectangle.width;
152 adjustedPosition.
y -= rectangle.height * 0.5f;
156 adjustedPosition.
y -= rectangle.height;
160 return adjustedPosition;
constexpr auto kAlignmentTopRight
右上
Definition mgl_alignment.h:166
constexpr auto kAlignmentMiddleLeft
左中央
Definition mgl_alignment.h:167
constexpr auto kAlignmentTopLeft
左上
Definition mgl_alignment.h:164
constexpr auto kAlignmentBottomLeft
左下
Definition mgl_alignment.h:170
constexpr auto kAlignmentTopCenter
中央上
Definition mgl_alignment.h:165
constexpr auto kAlignmentMiddleRight
右中央
Definition mgl_alignment.h:169
constexpr auto kAlignmentBottomCenter
中央下
Definition mgl_alignment.h:171
constexpr auto kAlignmentMiddleCenter
中央
Definition mgl_alignment.h:168
constexpr auto kAlignmentBottomRight
右下
Definition mgl_alignment.h:172
配置情報
Definition mgl_alignment.h:21
constexpr MGL::Vector2 AdjustPosition(const MGL::Vector2 &baseSize, const MGL::Vector2 &position) const noexcept
現在の配置情報を元に補正した座標を取得
Definition mgl_alignment.h:86
constexpr Alignment(Vertical inVertical, Horizontal inHorizontal) noexcept
コンストラクタ
Definition mgl_alignment.h:72
constexpr Alignment() noexcept
コンストラクタ
Definition mgl_alignment.h:46
constexpr Alignment(Horizontal inHorizontal, Vertical inVertical) noexcept
コンストラクタ
Definition mgl_alignment.h:59
Vertical vertical
垂直方向の配置情報
Definition mgl_alignment.h:39
Horizontal
水平方向の配置
Definition mgl_alignment.h:24
Vertical
垂直方向の配置
Definition mgl_alignment.h:32
Horizontal horizontal
水平方向の配置情報
Definition mgl_alignment.h:38
constexpr MGL::Vector2 AdjustRectangle(const MGL::Rectangle &rectangle) const noexcept
現在の配置情報を元に補正した矩形の原点を取得
Definition mgl_alignment.h:128
矩形
Definition mgl_rectangle.h:20
2Dベクトル
Definition mgl_vector2.h:23
float y
Y成分
Definition mgl_vector2.h:25
float x
X成分
Definition mgl_vector2.h:24