diff --git a/selfdrive/ui/qt/onroad.cc b/selfdrive/ui/qt/onroad.cc index 909889d..6fbc840 100644 --- a/selfdrive/ui/qt/onroad.cc +++ b/selfdrive/ui/qt/onroad.cc @@ -883,7 +883,7 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) { path_gradient = QLinearGradient(0, height(), 0, 0); path_gradient.setColorAt(0.0, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast(CENTER_LANE_ALPHA * 255 * 0.5))); path_gradient.setColorAt(0.5, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast(CENTER_LANE_ALPHA * 255 * 0.4))); - path_gradient.setColorAt(1.0, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast(OTHER_LANE_ALPHA * 255 * 0.0))); + path_gradient.setColorAt(1.0, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast(CENTER_LANE_ALPHA * 255 * 0.0))); } } else { path_gradient.setColorAt(0.0, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast(CENTER_LANE_ALPHA * 255 * 0.5))); @@ -891,8 +891,8 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) { path_gradient.setColorAt(1.0, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast(CENTER_LANE_ALPHA * 255 * 0.0))); } - painter.setBrush(path_gradient); - painter.drawPolygon(scene.track_vertices); + // painter.setBrush(path_gradient); + // painter.drawPolygon(scene.track_vertices); // Paint path edges // don't paint if not engaged color @@ -900,9 +900,12 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) { // Use current background color QLinearGradient edge_gradient; QColor test_color = QColor(201, 41, 204, 0xd1); - edge_gradient.setColorAt(0.0, QColor(test_color.red(), test_color.green(), test_color.blue(), static_cast(OTHER_LANE_ALPHA * 255))); - edge_gradient.setColorAt(0.5, QColor(test_color.red(), test_color.green(), test_color.blue(), static_cast(OTHER_LANE_ALPHA * 255 * 0.5))); - edge_gradient.setColorAt(1.0, QColor(test_color.red(), test_color.green(), test_color.blue(), static_cast(OTHER_LANE_ALPHA * 255 * 0.1))); + // edge_gradient.setColorAt(0.0, QColor(test_color.red(), test_color.green(), test_color.blue(), static_cast(OTHER_LANE_ALPHA * 255))); + // edge_gradient.setColorAt(0.5, QColor(test_color.red(), test_color.green(), test_color.blue(), static_cast(OTHER_LANE_ALPHA * 255 * 0.5))); + // edge_gradient.setColorAt(1.0, QColor(test_color.red(), test_color.green(), test_color.blue(), static_cast(OTHER_LANE_ALPHA * 255 * 0.1))); + edge_gradient.setColorAt(0.0, QColor(test_color.red(), test_color.green(), test_color.blue(), static_cast(255))); + edge_gradient.setColorAt(0.5, QColor(test_color.red(), test_color.green(), test_color.blue(), static_cast(255 * 0.5))); + edge_gradient.setColorAt(1.0, QColor(test_color.red(), test_color.green(), test_color.blue(), static_cast(255 * 0.1))); QPainterPath path; path.addPolygon(scene.track_vertices);