From 1eb3e092ab783b93cb763ecd533b003e4280c4c9 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 2 Sep 2022 20:53:41 +0200 Subject: [PATCH] fixed matrix transform on scaled --- src/hyprpicker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hyprpicker.cpp b/src/hyprpicker.cpp index 03c4bbc..18343ba 100644 --- a/src/hyprpicker.cpp +++ b/src/hyprpicker.cpp @@ -295,7 +295,7 @@ void CHyprpicker::renderSurface(CLayerSurface* pSurface) { cairo_matrix_init_identity(&matrix); cairo_matrix_translate(&matrix, CLICKPOS.x + 0.5f, CLICKPOS.y + 0.5f); cairo_matrix_scale(&matrix, 0.1f, 0.1f); - cairo_matrix_translate(&matrix, - CLICKPOS.x - 0.5f, - CLICKPOS.y - 0.5f); + cairo_matrix_translate(&matrix, - CLICKPOS.x / SCALEBUFS.x - 0.5f, - CLICKPOS.y / SCALEBUFS.y - 0.5f); cairo_pattern_set_matrix(PATTERN, &matrix); cairo_set_source(PCAIRO, PATTERN); cairo_arc(PCAIRO, m_vLastCoords.x * pSurface->m_pMonitor->scale, m_vLastCoords.y * pSurface->m_pMonitor->scale, 100 / SCALEBUFS.x, 0, 2 * M_PI);