From 6242961cccdbed1a0aaa98bc2cd90a6e83c647eb Mon Sep 17 00:00:00 2001 From: Andrei Alexeyev Date: Fri, 7 Apr 2023 03:30:30 +0200 Subject: [PATCH] resource/font: make possible to specify pos as cmplx in TextParams --- src/resource/font.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/resource/font.h b/src/resource/font.h index 106532c8..1450454a 100644 --- a/src/resource/font.h +++ b/src/resource/font.h @@ -64,7 +64,10 @@ typedef struct TextParams { GlyphDrawCallback func; void *userdata; } glyph_callback; - struct { double x, y; } pos; + union { + struct { double x, y; }; + cmplx as_cmplx; + } pos; const Color *color; const ShaderCustomParams *shader_params; Texture *aux_textures[R_NUM_SPRITE_AUX_TEXTURES];