mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-14 14:21:02 +00:00
gtk4: Always draw a black background behind the video frame
This makes sure that there is the same background behind the frame, no matter if black borders have to be added or not. Without this a frame that has transparency would change rendering depending on the layout. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1457>
This commit is contained in:
parent
9dcb68edc8
commit
bf3d302efc
1 changed files with 4 additions and 6 deletions
|
@ -144,12 +144,10 @@ impl PaintableImpl for Paintable {
|
|||
}
|
||||
}
|
||||
|
||||
if trans_x != 0.0 || trans_y != 0.0 {
|
||||
snapshot.append_color(
|
||||
&gdk::RGBA::BLACK,
|
||||
&graphene::Rect::new(0f32, 0f32, width as f32, height as f32),
|
||||
);
|
||||
}
|
||||
snapshot.append_color(
|
||||
&gdk::RGBA::BLACK,
|
||||
&graphene::Rect::new(0f32, 0f32, width as f32, height as f32),
|
||||
);
|
||||
|
||||
snapshot.translate(&graphene::Point::new(trans_x as f32, trans_y as f32));
|
||||
snapshot.scale(scale_x as f32, scale_y as f32);
|
||||
|
|
Loading…
Reference in a new issue