mirror of https://github.com/commaai/openpilot.git
parent
3dcadf11ec
commit
247dff5621
|
@ -314,8 +314,8 @@ void NvgWindow::drawLaneLines(QPainter &painter, const UIScene &scene) {
|
|||
}
|
||||
// paint path
|
||||
QLinearGradient bg(0, height(), 0, height() / 4);
|
||||
bg.setColorAt(0, scene.end_to_end ? redColor() : QColor(255, 255, 255));
|
||||
bg.setColorAt(1, scene.end_to_end ? redColor(0) : QColor(255, 255, 255, 0));
|
||||
bg.setColorAt(0, scene.end_to_end ? redColor() : whiteColor());
|
||||
bg.setColorAt(1, scene.end_to_end ? redColor(0) : whiteColor(0));
|
||||
painter.setBrush(bg);
|
||||
painter.drawPolygon(scene.track_vertices.v, scene.track_vertices.cnt);
|
||||
}
|
||||
|
|
|
@ -76,6 +76,7 @@ protected:
|
|||
void drawLaneLines(QPainter &painter, const UIScene &scene);
|
||||
void drawLead(QPainter &painter, const cereal::ModelDataV2::LeadDataV3::Reader &lead_data, const QPointF &vd);
|
||||
inline QColor redColor(int alpha = 255) { return QColor(201, 34, 49, alpha); }
|
||||
inline QColor whiteColor(int alpha = 255) { return QColor(255, 255, 255, alpha); }
|
||||
double prev_draw_t = 0;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue