simon-git: puzzles (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sun Dec 29 10:53:07 GMT 2024
TL;DR:
79be403 GTK 3: account for window scale in blitter.
Repository: https://git.tartarus.org/simon/puzzles.git
On the web: https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2024-12-29 10:53:07
commit 79be403101d055d2fde3611a5f133135d4094ee9
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=79be403101d055d2fde3611a5f133135d4094ee9;hp=5eea14c6c3814484d7c74c885e88f48095e93d53
Author: James Sutton <james.mark.sutton at gmail.com>
Date: Sun Dec 29 18:22:40 2024 +1300
GTK 3: account for window scale in blitter.
Commit 97a0dc0 adjusted the backing surface size based on the GTK
window scale, and used cairo_scale so that drawing code is oblivious
to this. The blitter operates on the underlying pixels and so should
account for the scaling, but no code was added for this.
Now we multiply the blitter dimensions by the window scale, scale the
pixel coordinates to save from, and set the scaling factor to 1:1 when
loading. This fixes rendering artefacts with "GDK_SCALE=2", or when
using display scaling with Wayland.
Also adjust the backing surface position in draw_area so that it is
centered properly.
gtk.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
More information about the tartarus-commits
mailing list