we render a point!!!
This commit is contained in:
@@ -7,7 +7,10 @@ namespace Render {
|
||||
_parent(parent),
|
||||
_engine(engine)
|
||||
{
|
||||
printf("Created Drawable id: %d\n", _id);
|
||||
}
|
||||
|
||||
Drawable::~Drawable() {
|
||||
|
||||
}
|
||||
|
||||
//--------+--------+--------+--------+--------+--------+--------+--------+--------+--------//
|
||||
@@ -19,17 +22,22 @@ namespace Render {
|
||||
|
||||
}
|
||||
|
||||
DrawablePoint::~DrawablePoint() {
|
||||
|
||||
}
|
||||
|
||||
void DrawablePoint::render() {
|
||||
uint8_t *buf;
|
||||
if (parent() == nullptr)
|
||||
buf = engine()->bBuffer();
|
||||
else
|
||||
buf = engine()->fBuffer();
|
||||
|
||||
//TODO: implement screen rotation and margin check
|
||||
auto dx = engine()->getSize().x;
|
||||
for (uint16_t xx(0); xx< _size.x; xx++){
|
||||
for (uint16_t yy(0); yy < _size.y; yy++)
|
||||
{
|
||||
engine()->setPixel(buf,getOrigin().x+xx,getOrigin().y+yy,true);
|
||||
engine()->setPixel(buf,dx-(getOrigin().x+xx),getOrigin().y+yy,true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user