wip
This commit is contained in:
@@ -641,8 +641,8 @@ void AnnotatedCameraWidget::updateState(const UIState &s) {
|
||||
}
|
||||
|
||||
void AnnotatedCameraWidget::updateLaneEdgeColor(QColor &bgColor) {
|
||||
if (bg != bgColor) {
|
||||
bg = bgColor;
|
||||
if (edgeColor != bgColor) {
|
||||
edgeColor = bgColor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -904,11 +904,11 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
|
||||
painter.drawPolygon(scene.track_vertices);
|
||||
|
||||
// Paint path edges ,Use current background color
|
||||
if (bg != bg_colors[STATUS_DISENGAGED]) {
|
||||
if (edgeColor != bg_colors[STATUS_DISENGAGED]) {
|
||||
QLinearGradient edge_gradient;
|
||||
edge_gradient.setColorAt(0.0, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(255)));
|
||||
edge_gradient.setColorAt(0.5, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(255 * 0.7) ));
|
||||
edge_gradient.setColorAt(1.0, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(255 * 0.5)));
|
||||
edge_gradient.setColorAt(0.0, QColor(edgeColor.red(), edgeColor.green(), edgeColor.blue(), static_cast<int>(255)));
|
||||
edge_gradient.setColorAt(0.5, QColor(edgeColor.red(), edgeColor.green(), edgeColor.blue(), static_cast<int>(255 * 0.7) ));
|
||||
edge_gradient.setColorAt(1.0, QColor(edgeColor.red(), edgeColor.green(), edgeColor.blue(), static_cast<int>(255 * 0.5)));
|
||||
|
||||
QPainterPath path;
|
||||
path.addPolygon(scene.track_vertices);
|
||||
|
||||
@@ -308,7 +308,7 @@ private:
|
||||
void mousePressEvent(QMouseEvent* e) override;
|
||||
OnroadAlerts *alerts;
|
||||
AnnotatedCameraWidget *nvg;
|
||||
QColor bg = bg_colors[STATUS_DISENGAGED];
|
||||
QColor edgeColor = bg_colors[STATUS_DISENGAGED];
|
||||
QWidget *map = nullptr;
|
||||
QHBoxLayout* split;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user