wip
This commit is contained in:
@@ -883,7 +883,7 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
|
|||||||
path_gradient = QLinearGradient(0, height(), 0, 0);
|
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<int>(CENTER_LANE_ALPHA * 255 * 0.5)));
|
path_gradient.setColorAt(0.0, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast<int>(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<int>(CENTER_LANE_ALPHA * 255 * 0.4)));
|
path_gradient.setColorAt(0.5, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast<int>(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<int>(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<int>(CENTER_LANE_ALPHA * 255 * 0.0)));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
path_gradient.setColorAt(0.0, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast<int>(CENTER_LANE_ALPHA * 255 * 0.5)));
|
path_gradient.setColorAt(0.0, QColor(center_lane_color.red(), center_lane_color.green(), center_lane_color.blue(), static_cast<int>(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<int>(CENTER_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<int>(CENTER_LANE_ALPHA * 255 * 0.0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
painter.setBrush(path_gradient);
|
// painter.setBrush(path_gradient);
|
||||||
painter.drawPolygon(scene.track_vertices);
|
// painter.drawPolygon(scene.track_vertices);
|
||||||
|
|
||||||
// Paint path edges
|
// Paint path edges
|
||||||
// don't paint if not engaged color
|
// don't paint if not engaged color
|
||||||
@@ -900,9 +900,12 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
|
|||||||
// Use current background color
|
// Use current background color
|
||||||
QLinearGradient edge_gradient;
|
QLinearGradient edge_gradient;
|
||||||
QColor test_color = QColor(201, 41, 204, 0xd1);
|
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<int>(OTHER_LANE_ALPHA * 255)));
|
// edge_gradient.setColorAt(0.0, QColor(test_color.red(), test_color.green(), test_color.blue(), static_cast<int>(OTHER_LANE_ALPHA * 255)));
|
||||||
edge_gradient.setColorAt(0.5, QColor(test_color.red(), test_color.green(), test_color.blue(), static_cast<int>(OTHER_LANE_ALPHA * 255 * 0.5)));
|
// edge_gradient.setColorAt(0.5, QColor(test_color.red(), test_color.green(), test_color.blue(), static_cast<int>(OTHER_LANE_ALPHA * 255 * 0.5)));
|
||||||
edge_gradient.setColorAt(1.0, QColor(test_color.red(), test_color.green(), test_color.blue(), static_cast<int>(OTHER_LANE_ALPHA * 255 * 0.1)));
|
// edge_gradient.setColorAt(1.0, QColor(test_color.red(), test_color.green(), test_color.blue(), static_cast<int>(OTHER_LANE_ALPHA * 255 * 0.1)));
|
||||||
|
edge_gradient.setColorAt(0.0, QColor(test_color.red(), test_color.green(), test_color.blue(), static_cast<int>(255)));
|
||||||
|
edge_gradient.setColorAt(0.5, QColor(test_color.red(), test_color.green(), test_color.blue(), static_cast<int>(255 * 0.5)));
|
||||||
|
edge_gradient.setColorAt(1.0, QColor(test_color.red(), test_color.green(), test_color.blue(), static_cast<int>(255 * 0.1)));
|
||||||
|
|
||||||
QPainterPath path;
|
QPainterPath path;
|
||||||
path.addPolygon(scene.track_vertices);
|
path.addPolygon(scene.track_vertices);
|
||||||
|
|||||||
Reference in New Issue
Block a user