mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-28 22:41:02 +00:00
gtk4: Do scaling with append_texture()
This is equivalent, but will be needed for the scaling filter support. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1309>
This commit is contained in:
parent
92891a61e8
commit
3423d05f77
1 changed files with 3 additions and 2 deletions
|
@ -177,7 +177,6 @@ impl PaintableImpl for Paintable {
|
|||
);
|
||||
|
||||
snapshot.translate(&graphene::Point::new(trans_x as f32, trans_y as f32));
|
||||
snapshot.scale(scale_x as f32, scale_y as f32);
|
||||
|
||||
for Texture {
|
||||
texture,
|
||||
|
@ -191,7 +190,9 @@ impl PaintableImpl for Paintable {
|
|||
{
|
||||
snapshot.push_opacity(*global_alpha as f64);
|
||||
|
||||
let bounds = graphene::Rect::new(*x, *y, *paintable_width, *paintable_height);
|
||||
let texture_width = *paintable_width * scale_x as f32;
|
||||
let texture_height = *paintable_height * 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.
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue