projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1ad1fc
)
rendernodepaintable: Preserve aspect ratio in snapshot()
author
Matthias Clasen
<mclasen@redhat.com>
Tue, 4 Apr 2023 02:19:39 +0000
(22:19 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Fri, 21 Apr 2023 07:03:26 +0000
(09:03 +0200)
This is the better fix.
gtk/gtkrendernodepaintable.c
patch
|
blob
|
history
diff --git
a/gtk/gtkrendernodepaintable.c
b/gtk/gtkrendernodepaintable.c
index 87bb1ca19a5a4fb15c7ce0ee93e6798333293205..f7987bdd6316ecce18e89a59975d2a1303b600ff 100644
(file)
--- a/
gtk/gtkrendernodepaintable.c
+++ b/
gtk/gtkrendernodepaintable.c
@@
-52,8
+52,8
@@
gtk_render_node_paintable_paintable_snapshot (GdkPaintable *paintable,
gtk_snapshot_save (snapshot);
gtk_snapshot_scale (snapshot,
- width / (self->bounds.size.width),
- height / (self->bounds.size.height));
+ width /
ceilf
(self->bounds.size.width),
+ height /
ceilf
(self->bounds.size.height));
gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (-self->bounds.origin.x, -self->bounds.origin.y));
gtk_snapshot_push_clip (snapshot, &self->bounds);