AeonGUI
A portable video game graphic user interface library.
Loading...
Searching...
No Matches
Rect.hpp
1/*
2Copyright (C) 2010-2012,2019,2025,2026 Rodrigo Jose Hernandez Cordoba
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16#ifndef AEONGUI_RECT_H
17#define AEONGUI_RECT_H
18#include <cstdint>
19#include "aeongui/Platform.hpp"
20namespace AeonGUI
21{
23 class Rect
24 {
25 public:
32 DLL Rect ( int32_t aX = 0, int32_t aY = 0, uint32_t aWidth = 0, uint32_t aHeight = 0 );
33
36
39 DLL int32_t GetX() const;
40
44 DLL int32_t GetY() const;
45
49 DLL uint32_t GetWidth() const;
50
54 DLL uint32_t GetHeight() const;
55
60 //void GetPosition ( int32_t& x, int32_t& y ) const;
61
66 //void GetDimensions ( int32_t& width, int32_t& height );
67
69
72
75 DLL void SetX ( int32_t X );
76
80 DLL void SetY ( int32_t Y );
81
85 DLL void SetWidth ( uint32_t width );
86
90 DLL void SetHeight ( uint32_t height );
91
92 //void Set ( int32_t X1, int32_t Y1, int32_t X2, int32_t Y2 );
93
100 //void SetPosition ( int32_t X, int32_t Y );
101
109 //void Move ( int32_t X, int32_t Y );
110
115 //void SetDimensions ( int32_t width, int32_t height );
116
118
123 //bool IsPointInside ( int32_t x, int32_t y );
124
128 //void Scale ( int32_t amount );
129
130 private:
131 int32_t mX;
132 int32_t mY;
133 uint32_t mWidth;
134 uint32_t mHeight;
135 };
136}
137#endif
Platform-specific DLL import/export macros and compiler helpers.
void SetY(int32_t Y)
Set Y coordinate.
Definition Rect.cpp:61
uint32_t GetHeight() const
Get Height.
Definition Rect.cpp:31
int32_t GetX() const
Get X coordinate.
Definition Rect.cpp:36
void SetHeight(uint32_t height)
Set Height.
Definition Rect.cpp:51
int32_t GetY() const
Get X coordinate.
Definition Rect.cpp:41
void SetX(int32_t X)
Set X coordinate.
Definition Rect.cpp:56
uint32_t GetWidth() const
Get Width.
Definition Rect.cpp:26
void SetWidth(uint32_t width)
Set Width.
Definition Rect.cpp:46
Rect(int32_t aX=0, int32_t aY=0, uint32_t aWidth=0, uint32_t aHeight=0)
Position and Dimensions constructor.
Definition Rect.cpp:21