|
|
@@ -258,7 +258,17 @@ 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 = Math::Lerp(t, color0, color1);
|
|
|
+ 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));
|
|
|
|
|
|
@@ -336,7 +346,17 @@ 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 = Math::Lerp(t, color0, color1);
|
|
|
+ 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));
|
|
|
|