Files
UwUGL/point.cpp
T

28 lines
521 B
C++

#pragma once
#include <stdint.h>
#include "datatypes.cpp"
#include "helpers.cpp"
#include "buffer.cpp"
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;};
buffer.drawPixel(Coord2(x, y), color);
return;
}
};
}