horizon at end

This commit is contained in:
royjr
2025-09-21 21:49:01 -04:00
parent 225858261e
commit ea9ca18c8b

View File

@@ -127,12 +127,6 @@ void ModelRenderer::drawLaneLines(QPainter &painter) {
// Fill above horizon: pure black
// painter.fillRect(QRectF(r.left(), r.top(), r.width(), horizonY - 100), QColor("#000000"));
// Gradient band across horizon
QLinearGradient bgGrad(r.left(), horizonY - 50, r.left(), horizonY + 50);
bgGrad.setColorAt(0.0, QColor("#000000")); // top of band
bgGrad.setColorAt(0.5, QColor("#111111")); // middle blend
bgGrad.setColorAt(1.0, QColor("#111111")); // bottom of band
painter.fillRect(QRectF(r.left(), horizonY - 100, r.width(), 100), bgGrad);
// Fill below horizon: solid dark gray
painter.fillRect(QRectF(r.left(), horizonY + 0, r.width(), r.bottom() - (horizonY + 0)), QColor("#111111"));
@@ -201,6 +195,13 @@ void ModelRenderer::drawLaneLines(QPainter &painter) {
painter.drawPolygon(road_edge_vertices[i]);
}
// Gradient band across horizon
QLinearGradient bgGrad(r.left(), horizonY - 100, r.left(), horizonY + 100);
bgGrad.setColorAt(0.0, QColor("#000000")); // top of band
bgGrad.setColorAt(0.5, QColor("#111111")); // middle blend
bgGrad.setColorAt(1.0, QColor("#111111")); // bottom of band
painter.fillRect(QRectF(r.left(), horizonY - 200, r.width(), 200), bgGrad);
} else {
// lanelines
for (int i = 0; i < std::size(lane_line_vertices); ++i) {