gtk4: scale texture position

Fix regression in 0.12 introduced by 3423d05f77

Code from Ivan Molodetskikh suggested on Matrix.

Fix #519

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1499>
This commit is contained in:
Guillaume Desmottes 2024-03-15 12:59:52 +01:00
parent 6f8fc5f178
commit 523a46b4f5

View file

@ -220,7 +220,9 @@ impl PaintableImpl for Paintable {
let texture_width = *paintable_width * scale_x as f32; let texture_width = *paintable_width * scale_x as f32;
let texture_height = *paintable_height * scale_y as f32; let texture_height = *paintable_height * scale_y as f32;
let bounds = graphene::Rect::new(*x, *y, texture_width, texture_height); let x = *x * scale_x as f32;
let y = *y * scale_y as f32;
let bounds = graphene::Rect::new(x, y, texture_width, texture_height);
// Only premultiply GL textures that expect to be in premultiplied RGBA format. // Only premultiply GL textures that expect to be in premultiplied RGBA format.
// //