font/sprite: fix light arc character for odd thicknesses

+ update Box.ppm ground truth image
This commit is contained in:
Qwerasd
2024-10-14 20:47:04 -04:00
parent c0315a04b4
commit 37144fd5b8
2 changed files with 2 additions and 2 deletions

View File

@ -2127,8 +2127,8 @@ fn draw_light_arc(
const float_width: f64 = @floatFromInt(self.width);
const float_height: f64 = @floatFromInt(self.height);
const float_thick: f64 = @floatFromInt(thick_px);
const center_x: f64 = @floatFromInt(self.width / 2 + self.width % 2);
const center_y: f64 = @floatFromInt(self.height / 2 + self.height % 2);
const center_x: f64 = @as(f64, @floatFromInt((self.width -| thick_px) / 2)) + float_thick / 2;
const center_y: f64 = @as(f64, @floatFromInt((self.height -| thick_px) / 2)) + float_thick / 2;
const r = @min(float_width, float_height) / 2;

Binary file not shown.