Размер не зависит от ширины

This commit is contained in:
2025-11-17 16:13:47 +03:00
parent 2c383b20e9
commit 58eb3695f1
5 changed files with 85 additions and 34 deletions

View File

@@ -19,7 +19,8 @@ void figure_draw(struct window_draw_info* draw_info, float border_thickness, uin
/* center in pixels */
float cx = fig.position.x * (float)w;
float cy = fig.position.y * (float)h;
float r = fig.radius * (float)w; /* normalized to width */
/* `fig.radius` is in pixels now; use it directly. */
float r = fig.radius;
float r2 = r * r;
float border = border_thickness;
if (border < 0.0f) border = 0.0f;