diff options
author | Matthias Clasen <mclasen@redhat.com> | 2023-04-03 22:19:39 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2023-04-03 22:33:34 -0400 |
commit | 9ccde8b913f2e538185008d1ac38a4877538de6f (patch) | |
tree | 29972d836ad440c04592cfeb86919850112a9eaa /gtk/gtkrendernodepaintable.c | |
parent | 70e56f0deac1788203200a76fbc40530b5f8c7d2 (diff) | |
download | gtk+-9ccde8b913f2e538185008d1ac38a4877538de6f.tar.gz |
rendernodepaintable: Preserve aspect ratio in snapshot()
This is the better fix.
Diffstat (limited to 'gtk/gtkrendernodepaintable.c')
-rw-r--r-- | gtk/gtkrendernodepaintable.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkrendernodepaintable.c b/gtk/gtkrendernodepaintable.c index 1379ba3404..3e994ad8e9 100644 --- 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); |