set_keep_aspect_ratio
Description:
[ Version ( deprecated = true , deprecated_since = "4.8" ) ]
public void set_keep_aspect_ratio (bool keep_aspect_ratio)
public void set_keep_aspect_ratio (bool keep_aspect_ratio)
Warning: set_keep_aspect_ratio is deprecated since 4.8.
If set to true, the this will render its contents according to their aspect ratio.
Note:
Use [method@Gtk.Picture.set_content_fit] instead. If still used, this method will always set the [property@Gtk.Picture:content-fit]
property to `GTK_CONTENT_FIT_CONTAIN` if keep_aspect_ratio
is true, otherwise it will set it to `GTK_CONTENT_FIT_FILL`.
That means that empty space may show up at the top/bottom or left/right of this.
If set to false or if the contents provide no aspect ratio, the contents will be stretched over the picture's whole area.
Parameters:
this |
a `GtkPicture` |
keep_aspect_ratio |
whether to keep aspect ratio |