Split render primitives into dedicated modules

This commit is contained in:
Stanislav N Mikhailov
2026-03-24 21:52:09 +03:00
parent 00b4bfd3d8
commit 0a9b9eb741
8 changed files with 181 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
#pragma once
#include "display/render/context.h"
#ifdef __cplusplus
extern "C" {
#endif
void render_bezier(
render_ctx_t* ctx,
const int* points_x,
const int* points_y,
size_t num_points,
uint16_t color
);
#ifdef __cplusplus
}
#endif
+13
View File
@@ -0,0 +1,13 @@
#pragma once
#include "display/render/line.h"
#ifdef __cplusplus
extern "C" {
#endif
void render_grid(render_ctx_t* ctx, uint16_t x, uint16_t y, uint16_t step, uint16_t color);
#ifdef __cplusplus
}
#endif
+13
View File
@@ -0,0 +1,13 @@
#pragma once
#include "display/render/context.h"
#ifdef __cplusplus
extern "C" {
#endif
void render_line(render_ctx_t* ctx, int x0, int y0, int x1, int y1, uint16_t color);
#ifdef __cplusplus
}
#endif
+22
View File
@@ -0,0 +1,22 @@
#pragma once
#include "display/render/context.h"
#ifdef __cplusplus
extern "C" {
#endif
void render_sine_wave(
render_ctx_t* ctx,
uint16_t num_points,
int amplitude,
float frequency,
int offset_x,
int offset_y,
float phase_shift,
uint16_t color
);
#ifdef __cplusplus
}
#endif