From 791ef4b4a6e11c5cc43fc6fd2dab2365e6288d49 Mon Sep 17 00:00:00 2001 From: Mehmet Ali Date: Mon, 6 Feb 2023 13:26:20 +0300 Subject: [PATCH] gg: fix gg.scissor_rect behavior on Android (#17229) --- vlib/gg/gg_ui.c.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/gg/gg_ui.c.v b/vlib/gg/gg_ui.c.v index 4faa83aadf..4e3c9597a1 100644 --- a/vlib/gg/gg_ui.c.v +++ b/vlib/gg/gg_ui.c.v @@ -7,8 +7,8 @@ import sokol.sgl // required for ui.DrawDevice interface (with &gg.Context as an instance) pub fn (ctx &Context) scissor_rect(x int, y int, w int, h int) { - sgl.scissor_rect(int(dpi_scale() * x), int(dpi_scale() * y), int(dpi_scale() * w), - int(dpi_scale() * h), true) + sgl.scissor_rect(int(ctx.scale * x), int(ctx.scale * y), int(ctx.scale * w), int(ctx.scale * h), + true) } pub fn (ctx &Context) has_text_style() bool {