mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-24 14:22:07 +08:00
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user