improved rectangle
This commit is contained in:
@@ -116,6 +116,7 @@ namespace Render{
|
||||
uint16_t _bufferDim;
|
||||
Drawables _drawables; // background drawables for all the pages
|
||||
ScreenRotation _rotation;
|
||||
bool _full;
|
||||
|
||||
public:
|
||||
uint8_t* bBuffer() { return _screenBufferBackground; }
|
||||
@@ -188,7 +189,11 @@ namespace Render{
|
||||
~DrawableLine();
|
||||
|
||||
public:
|
||||
void setThickness(uint16_t thickness) {_thickness = thickness;};
|
||||
void setThickness(uint16_t thickness) {
|
||||
uint8_t d = thickness >> 1;
|
||||
_thickness = thickness;
|
||||
_ofst = (d % 2)==0 ? d + 1: d;
|
||||
};
|
||||
const uint16_t getThickness() {return _thickness;};
|
||||
void setRotation(uint16_t rotation) {_rotation = rotation;};
|
||||
const uint16_t getRotation() {return _rotation;};
|
||||
@@ -203,6 +208,7 @@ namespace Render{
|
||||
uint16_t _thickness;
|
||||
uint16_t _length;
|
||||
uint16_t _rotation;
|
||||
uint8_t _ofst;
|
||||
};
|
||||
|
||||
class DrawableRectangle: public Drawable {
|
||||
|
||||
Reference in New Issue
Block a user