wip
This commit is contained in:
@@ -874,8 +874,8 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
|
|||||||
acceleration.push_back(acceleration_const[i]);
|
acceleration.push_back(acceleration_const[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
for (int i = 0; i < max_len; ++i) {
|
for (int i = 0; i < max_len; ++i) {
|
||||||
if (scene.track_vertices[i].y() < 0 || scene.track_vertices[i].y() > height()) continue;
|
if (scene.track_vertices[i].y() < 0 || scene.track_vertices[i].y() > height()) continue;
|
||||||
|
|
||||||
float lin_grad_point = (height() - scene.track_vertices[i].y()) / height();
|
float lin_grad_point = (height() - scene.track_vertices[i].y()) / height();
|
||||||
@@ -892,8 +892,9 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
|
|||||||
|
|
||||||
QColor final_color = QColor::fromHslF(static_cast<float>(_h / 360.f), adjusted_saturation, adjusted_lightness, dynamic_alpha);
|
QColor final_color = QColor::fromHslF(static_cast<float>(_h / 360.f), adjusted_saturation, adjusted_lightness, dynamic_alpha);
|
||||||
bg.setColorAt(lin_grad_point, final_color);
|
bg.setColorAt(lin_grad_point, final_color);
|
||||||
|
|
||||||
|
i += (i + 2) < max_len ? 1 : 0; // Skipping a point to optimize rendering
|
||||||
}
|
}
|
||||||
i += (i + 2) < max_len ? 1 : 0; // Skipping a point to optimize rendering
|
|
||||||
}
|
}
|
||||||
} catch () {
|
} catch () {
|
||||||
// Default shading if for some reason the above code fails
|
// Default shading if for some reason the above code fails
|
||||||
|
|||||||
Reference in New Issue
Block a user