m5stack-avatar
Loading...
Searching...
No Matches
BoundingRect.h
1
// Copyright (c) Shinya Ishikawa. All rights reserved.
2
// Licensed under the MIT license. See LICENSE file in the project root for full
3
// license information.
4
5
#ifndef BOUNDINGRECT_H_
6
#define BOUNDINGRECT_H_
7
#include <stdint.h>
8
9
namespace
m5avatar {
10
class
BoundingRect
{
11
private
:
12
int16_t top;
13
int16_t left;
14
int16_t width;
15
int16_t height;
16
17
public
:
18
BoundingRect
() =
default
;
19
~BoundingRect
() =
default
;
20
BoundingRect
(int16_t top, int16_t left);
21
BoundingRect
(int16_t top, int16_t left, int16_t width, int16_t height);
22
BoundingRect
(
const
BoundingRect
&other) =
default
;
23
BoundingRect
&operator=(
const
BoundingRect
&other) =
default
;
24
int16_t getTop();
25
int16_t getLeft();
26
int16_t getRight();
27
int16_t getBottom();
28
int16_t getCenterX();
29
int16_t getCenterY();
30
int16_t getWidth();
31
int16_t getHeight();
32
void
setPosition(int16_t top, int16_t left);
33
void
setSize(int16_t width, int16_t height);
34
};
35
}
// namespace m5avatar
36
37
#endif
// BOUNDINGRECT_H_
m5avatar::BoundingRect
Definition:
BoundingRect.h:10
src
BoundingRect.h
Generated by
1.9.5