b15f/driver/src/drv/dot.cpp

23 lines
326 B
C++
Raw Normal View History

2019-03-27 15:08:28 +00:00
#include "dot.h"
2019-03-28 08:38:35 +00:00
Dot::Dot(uint16_t x, uint16_t y, uint8_t curve) : x(x), y(y), curve(curve)
2019-03-27 15:08:28 +00:00
{
2019-03-28 08:38:35 +00:00
if(curve >= 64)
throw std::range_error("Kurvenindex muss im Bereich [0, 63] liegen");
2019-03-27 15:08:28 +00:00
}
uint16_t Dot::getX() const
{
return x;
}
uint16_t Dot::getY() const
{
return y;
}
2019-03-28 08:38:35 +00:00
uint8_t Dot::getCurve(void) const
2019-03-27 15:08:28 +00:00
{
2019-03-28 08:38:35 +00:00
return curve;
2019-03-27 15:08:28 +00:00
}