void ColorDisplay::draw(GraphicContext& gc) { gc.fill_rect(Rect(Point(get_rect().get_width()/3, get_rect().get_height()/3), Size(2*get_rect().get_width()/3, 2*get_rect().get_height()/3)), Color(128, 128, 128)); gc.fill_rect(Rect(Point(get_rect().get_width()/3+1, get_rect().get_height()/3+1), Size(2*get_rect().get_width()/3-2, 2*get_rect().get_height()/3-2)), Color(background.r, background.g, background.b)); gc.fill_rect(Rect(Point(0, 0), Size(2*get_rect().get_width()/3, 2*get_rect().get_height()/3)), Color(128, 128, 128)); gc.fill_rect(Rect(Point(1, 1), Size(2*get_rect().get_width()/3-2, 2*get_rect().get_height()/3-2)), Color(foreground.r, foreground.g, foreground.b)); if (0) std::cout << "Color: " << (int)foreground.r << " " << (int)foreground.g << " " << (int)foreground.b << std::endl; }
void TextView::draw(GraphicContext& gc) { if (1) gc.fill_rect(Rect(0, 0, get_rect().get_width(), get_rect().get_height()), Color(64, 64, 64)); // FIXME: move font handling in GraphicContext TTY_Blit(tty, gc.get_surface(), get_rect().left, get_rect().top); }