Added calibrate screen (WIP). fixed bug in emulator drawing.
This commit is contained in:
@@ -69,7 +69,7 @@ void MainWindow::draw_rectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t
|
||||
//render_mutex.lock();
|
||||
QPainter painter(&(image));
|
||||
painter.setPen(QColorFromRGB565(color));
|
||||
painter.drawRect(x1,y1,abs(x2-x1)+1,abs(y2-y1)+1);
|
||||
painter.drawRect(qMin(x1,x2),qMin(y1,y2),abs((int)x2-(int)x1)+1,abs((int)y2-(int)y1)+1);
|
||||
//render_mutex.unlock();
|
||||
update();
|
||||
}
|
||||
@@ -78,7 +78,7 @@ void MainWindow::fill_rectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t
|
||||
{
|
||||
//render_mutex.lock();
|
||||
QPainter painter(&(image));
|
||||
painter.fillRect(x1,y1,abs(x2-x1)+1,abs(y2-y1)+1,QColorFromRGB565(color));
|
||||
painter.fillRect(qMin(x1,x2),qMin(y1,y2),abs((int)x2-(int)x1)+1,abs((int)y2-(int)y1)+1,QColorFromRGB565(color));
|
||||
//render_mutex.unlock();
|
||||
update();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user