From cdb31119f36e382dd72295497941bcda5b53c084 Mon Sep 17 00:00:00 2001 From: R cqls Date: Mon, 28 Jun 2021 12:32:17 +0200 Subject: [PATCH] x.ttf: apply ctx.scale for x and y in draw_text_bmp (#10598) --- vlib/x/ttf/render_sokol_cpu.v | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vlib/x/ttf/render_sokol_cpu.v b/vlib/x/ttf/render_sokol_cpu.v index c993250dba..f0e60eb43c 100644 --- a/vlib/x/ttf/render_sokol_cpu.v +++ b/vlib/x/ttf/render_sokol_cpu.v @@ -30,7 +30,7 @@ pub mut: * Render functions * ******************************************************************************/ -fn (mut tf_skl TTF_render_Sokol) format_texture() { +pub fn (mut tf_skl TTF_render_Sokol) format_texture() { tf_skl.bmp.format_texture() } @@ -188,8 +188,8 @@ pub fn (tf_skl TTF_render_Sokol) draw_text_bmp(ctx &gg.Context, x f32, y f32) { 0, 1, 0, - x, - y, + x * ctx.scale, + y * ctx.scale, 0, 1, ]