summaryrefslogtreecommitdiff
path: root/graphics.c
diff options
context:
space:
mode:
Diffstat (limited to 'graphics.c')
-rw-r--r--graphics.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/graphics.c b/graphics.c
index 3b3f539..ea7edee 100644
--- a/graphics.c
+++ b/graphics.c
@@ -1211,7 +1211,7 @@ void fill_triangle(Brush brush, f64 x0, f64 y0, f64 x1, f64 y1, f64 x2, f64 y2)
f64 height = max3_(y0, y1, y2) - y;
Brush clear = aa;
- clear.color = (vec4_f32) {0};
+ clear.color = vec4_from_vec3_f32(vec3_from_vec4_f32(brush.color), 0.f);
fill_rectangle_(clear, 0, 0, width, height);
fill_triangle_(aa, x0 - x, y0 - y, x1 - x, y1 - y, x2 - x, y2 - y);
@@ -1245,7 +1245,7 @@ void fill_quad(Brush brush, f64 x0, f64 y0, f64 x1, f64 y1, f64 x2, f64 y2, f64
f64 height = max4_(y0, y1, y2, y3) - y;
Brush clear = aa;
- clear.color = (vec4_f32) {0};
+ clear.color = vec4_from_vec3_f32(vec3_from_vec4_f32(brush.color), 0.f);
fill_rectangle_(clear, 0, 0, width, height);
fill_quad_(aa, x0 - x, y0 - y, x1 - x, y1 - y, x2 - x, y2 - y, x3 - x, y3 - y);
@@ -1280,7 +1280,7 @@ void fill_ellipse(Brush brush, f64 x, f64 y, f64 width, f64 height) {
Brush aa = antialiasing_brush_(brush);
Brush clear = aa;
- clear.color = (vec4_f32) {0};
+ clear.color = vec4_from_vec3_f32(vec3_from_vec4_f32(brush.color), 0.f);
fill_rectangle_(clear, 0, 0, width, height);
fill_ellipse_(aa, 0, 0, width, height);
@@ -1348,7 +1348,7 @@ void draw_text_area(Brush brush, f64 x, f64 y, f64 width, f64 height, f64 max_sc
Brush aa = antialiasing_brush_(brush);
Brush clear = aa;
- clear.color = (vec4_f32) {0};
+ clear.color = vec4_from_vec3_f32(vec3_from_vec4_f32(brush.color), 0.f);
fill_rectangle_(clear, 0, 0, width, height);
draw_text_(aa, 0, 0, kx, ky, num_chars, text);