|
|
@@ -258,22 +258,11 @@ void GeometryBackgroundBorder::DrawArc(Vector2f pos_center, Vector2f r, float a0
|
|
|
const float t = float(i) / float(num_points - 1);
|
|
|
|
|
|
const float a = Math::Lerp(t, a0, a1);
|
|
|
- const Colourb color
|
|
|
- {
|
|
|
- static_cast<unsigned char>(Math::RoundToInteger(Math::Lerp(t,
|
|
|
- static_cast<float>(color0[0]), static_cast<float>(color1[0])))),
|
|
|
- static_cast<unsigned char>(Math::RoundToInteger(Math::Lerp(t,
|
|
|
- static_cast<float>(color0[1]), static_cast<float>(color1[1])))),
|
|
|
- static_cast<unsigned char>(Math::RoundToInteger(Math::Lerp(t,
|
|
|
- static_cast<float>(color0[2]), static_cast<float>(color1[2])))),
|
|
|
- static_cast<unsigned char>(Math::RoundToInteger(Math::Lerp(t,
|
|
|
- static_cast<float>(color0[3]), static_cast<float>(color1[3]))))
|
|
|
- };
|
|
|
|
|
|
const Vector2f unit_vector(Math::Cos(a), Math::Sin(a));
|
|
|
|
|
|
vertices[offset_vertices + i].position = unit_vector * r + pos_center;
|
|
|
- vertices[offset_vertices + i].colour = color;
|
|
|
+ vertices[offset_vertices + i].colour = Math::RoundedLerp(t, color0, color1);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -346,18 +335,7 @@ void GeometryBackgroundBorder::DrawArcArc(Vector2f pos_center, float R, Vector2f
|
|
|
const float t = float(i) / float(num_points - 1);
|
|
|
|
|
|
const float a = Math::Lerp(t, a0, a1);
|
|
|
- const Colourb color
|
|
|
- {
|
|
|
- static_cast<unsigned char>(Math::RoundToInteger(Math::Lerp(t,
|
|
|
- static_cast<float>(color0[0]), static_cast<float>(color1[0])))),
|
|
|
- static_cast<unsigned char>(Math::RoundToInteger(Math::Lerp(t,
|
|
|
- static_cast<float>(color0[1]), static_cast<float>(color1[1])))),
|
|
|
- static_cast<unsigned char>(Math::RoundToInteger(Math::Lerp(t,
|
|
|
- static_cast<float>(color0[2]), static_cast<float>(color1[2])))),
|
|
|
- static_cast<unsigned char>(Math::RoundToInteger(Math::Lerp(t,
|
|
|
- static_cast<float>(color0[3]), static_cast<float>(color1[3]))))
|
|
|
- };
|
|
|
-
|
|
|
+ const Colourb color = Math::RoundedLerp(t, color0, color1);
|
|
|
const Vector2f unit_vector(Math::Cos(a), Math::Sin(a));
|
|
|
|
|
|
vertices[offset_vertices + 2 * i].position = unit_vector * r + pos_center;
|