b15f/control/src/drv/dot.h

42 lines
665 B
C
Raw Normal View History

2019-03-27 15:08:28 +00:00
#ifndef DOT_H
#define DOT_H
#include <cstdint>
2019-03-28 08:38:35 +00:00
#include <stdexcept>
2019-03-27 15:08:28 +00:00
2019-05-23 13:08:54 +00:00
/**
* Immutable dot class with x and y coordinate and curve index.
* Dots with the same curve index get the same color by plotty.
*/
2019-03-27 15:08:28 +00:00
class Dot
{
public:
2019-05-23 13:08:54 +00:00
/**
* Constructor with x and y coordinate and curve index.
*/
Dot(uint16_t x, uint16_t y, uint8_t curve);
/**
* Returns the x coordinate.
*/
uint16_t getX(void) const;
/**
* Returns the y coordinate.
*/
uint16_t getY(void) const;
/**
* Returns the curve index.
*/
uint8_t getCurve(void) const;
2019-03-27 15:08:28 +00:00
private:
2019-05-23 13:08:54 +00:00
uint16_t x, y;
uint8_t curve;
2019-03-27 15:08:28 +00:00
};
#endif // DOT_H