summaryrefslogtreecommitdiff
path: root/graphics.c
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2024-11-08 08:56:45 +0100
committerMitya Selivanov <automainint@guattari.tech>2024-11-08 08:56:45 +0100
commitb12ca99506c7538a74cb2ed39ce0e1781e934a2a (patch)
treeb22c0f8d5be056c8604c744c44a29b4c9b767eca /graphics.c
parentdc95a43da475b8ce55f25b670c9848d9dabf1cb7 (diff)
downloadreduced_system_layer-b12ca99506c7538a74cb2ed39ce0e1781e934a2a.zip
Update input
Diffstat (limited to 'graphics.c')
-rw-r--r--graphics.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/graphics.c b/graphics.c
index d58f0d8..014ec83 100644
--- a/graphics.c
+++ b/graphics.c
@@ -386,6 +386,9 @@ void fill_rectangle(u32 op, u32 color, f64 x0, f64 y0, f64 width, f64 height) {
}
void fill_triangle(u32 op, u32 color, f64 x0, f64 y0, f64 x1, f64 y1, f64 x2, f64 y2) {
+ // FIXME PERF:
+ // Implement better algorithm.
+
i64 min_x = (i64) floor(min3(x0, x1, x2));
i64 min_y = (i64) floor(min3(y0, y1, y2));
i64 max_x = (i64) ceil (max3(x0, x1, x2));