Function zng_wgt_image::img_align
source · pub fn img_align(child: impl UiNode, fit: impl IntoVar<Align>) -> impl UiNode
Expand description
P
Sets the Align
of all inner images within each image widget area.
If the image is smaller then the widget area it is aligned like normal, if it is larger the “viewport” it is aligned to clip,
for example, alignment BOTTOM_RIGHT
makes a smaller image sit at the bottom-right of the widget and makes
a larger image bottom-right fill the widget, clipping the rest.
By default the alignment is CENTER
. The BASELINE
alignment is treaded the same as BOTTOM
.