pub fn img_rendering(
child: impl UiNode,
rendering: impl IntoVar<ImageRendering>,
) -> impl UiNode
Expand description
P
Sets the ImageRendering
of all inner images.
If the image layout size is not the same as the source
pixel size the image must be re-scaled
during rendering, this property selects what algorithm is used to do this re-scaling.
Note that the algorithms used in the renderer value performance over quality and do a good enough job for small or temporary changes in scale only. If the image stays at a very different scale after a short time a CPU re-scale task is automatically started to generate a better quality re-scaling.
If the image is an app resource known during build time you should consider pre-scaling it to match the screen size at different DPIs using mipmaps.
This is ImageRendering::Auto
by default.