Add a display server and graphical user interface #38

Merged
apio merged 103 commits from display-server into main 2023-09-20 18:49:21 +00:00
Showing only changes of commit 7441e396b3 - Show all commits

View File

@ -9,16 +9,8 @@ namespace ui
Canvas Canvas::subcanvas(Rect rect)
{
if (rect.pos.x < 0)
{
rect.pos.x = 0;
rect.width = rect.width + rect.pos.x;
}
if (rect.pos.y < 0)
{
rect.pos.y = 0;
rect.height = rect.height + rect.pos.y;
}
if (rect.pos.x < 0) rect.pos.x = 0;
if (rect.pos.y < 0) rect.pos.y = 0;
if (rect.pos.x + rect.width > width) rect.width = width - rect.pos.x;
if (rect.pos.y + rect.height > height) rect.height = height - rect.pos.y;