wip
This commit is contained in:
@@ -898,16 +898,16 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
|
||||
// don't paint if not engaged color
|
||||
if (bg != bg_colors[STATUS_DISENGAGED]) {
|
||||
// Use current background color
|
||||
QColor edge_color;
|
||||
edge_color.setColorAt(0.0, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(OTHER_LANE_ALPHA * 255)));
|
||||
edge_color.setColorAt(0.5, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(OTHER_LANE_ALPHA * 255 * 0.5)));
|
||||
edge_color.setColorAt(1.0, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(OTHER_LANE_ALPHA * 255 * 0.1)));
|
||||
QLinearGradient edge_gradient;
|
||||
edge_gradient.setColorAt(0.0, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(OTHER_LANE_ALPHA * 255)));
|
||||
edge_gradient.setColorAt(0.5, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(OTHER_LANE_ALPHA * 255 * 0.5)));
|
||||
edge_gradient.setColorAt(1.0, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(OTHER_LANE_ALPHA * 255 * 0.1)));
|
||||
|
||||
QPainterPath path;
|
||||
path.addPolygon(scene.track_vertices);
|
||||
path.addPolygon(scene.track_edge_vertices);
|
||||
|
||||
painter.setBrush(pe);
|
||||
painter.setBrush(edge_gradient);
|
||||
painter.drawPath(path);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user