UiUiUi
A user interface library for micro controller sketches based on U8g2
UIPoint.h
1 // SPDX-License-Identifier: BSD-2-Clause
2 // (C) 2022 Dirk Hillbrecht
3 
4 #pragma once
5 
6 #include "Arduino.h"
7 
9 class UIPoint final {
10  public:
11 
13  UIPoint(uint16_t x,uint16_t y);
14 
16  UIPoint();
17 
19  void setFrom(UIPoint p);
20 
22  void debugPrint(const char* label);
23 
25  uint16_t x;
26 
28  uint16_t y;
29 
30 };
31 
32 // end of file
Representation of a point on the display.
Definition: UIPoint.h:9
UIPoint()
Initialize the point as "0,0".
Definition: UIPoint.cpp:11
uint16_t x
X Coordinate of the point, normally 0 is top.
Definition: UIPoint.h:25
void setFrom(UIPoint p)
Set the point from another point.
Definition: UIPoint.cpp:14
uint16_t y
Y Coordinate of the point, normally 0 is left.
Definition: UIPoint.h:28
void debugPrint(const char *label)
Debug output of this point with some prepended label.
Definition: UIPoint.cpp:17