/** * Draw the map. * * @param painter Reference to a Painter object. */ void Window::draw(Painter& painter) { Component::draw(painter); painter.setLineColor(Color(0, 0, 0, 0xff)); painter.drawRectangle(Rect2D(0, 0, width, height)); }
void TableLayout::draw(Painter& painter) { Component::draw(painter); if(border) { float r = 0; float c = 0; painter.setLineColor(Color(0, 0, 255)); for(size_t row = 0; row < rowproperties.size(); ++row) { float nextr = r + rowproperties[row].realval; for(size_t col = 0; col < colproperties.size(); ++col) { float nextc = c + colproperties[col].realval; painter.drawRectangle(Rect2D(c, r, nextc, nextr)); c = nextc; } r = nextr; c = 0; } } }