2026-07-07 07:25:49 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
2026-07-07 08:09:54 -07:00
|
|
|
#include "../datatypes.cpp"
|
|
|
|
|
#include "../helpers.cpp"
|
|
|
|
|
#include "../buffer.cpp"
|
2026-07-07 07:25:49 -07:00
|
|
|
|
|
|
|
|
namespace UwU {
|
|
|
|
|
// point
|
|
|
|
|
class Point {
|
|
|
|
|
public:
|
|
|
|
|
Point(uint16_t x, uint16_t y) {
|
|
|
|
|
this->x = x;
|
|
|
|
|
this->y = y;
|
|
|
|
|
}
|
|
|
|
|
Point() {}
|
|
|
|
|
uint16_t x;
|
|
|
|
|
uint16_t y;
|
|
|
|
|
|
|
|
|
|
// Draw a rectangle
|
|
|
|
|
void draw (Buffer buffer, Color color) {
|
|
|
|
|
if (x > buffer.width || y > buffer.height) {return;};
|
2026-07-08 14:34:55 -07:00
|
|
|
buffer.drawPixel(x, y, color);
|
2026-07-07 07:25:49 -07:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|