Crate zng_wgt_image

Source
Expand description

Image widget, properties and nodes.

§Crate

This crate is part of the zng project.

Modules§

border
9-patch image border.
mask
Mask properties, mask_image, mask_mode and more.
node
UI nodes used for building the image widget.

Structs§

Image
W Image presenter.
ImgErrorArgs
Arguments for on_error and img_error_fn.
ImgLoadArgs
Arguments for on_load.
ImgLoadingArgs
Arguments for img_loading_fn.

Enums§

ImageFit
Image layout mode.
ImageRepeat
Image repeat mode.

Statics§

IMAGE_ALIGN_VAR
Align of the image in relation to the image widget final size.
IMAGE_CACHE_VAR
If the image is cached.
IMAGE_CROP_VAR
Simple clip applied to the image before layout.
IMAGE_DOWNSCALE_VAR
Custom resize applied during image decode.
IMAGE_ERROR_FN_VAR
Widget function for the content shown when the image does not load.
IMAGE_FIT_VAR
The image layout mode.
IMAGE_LIMITS_VAR
Custom image load and decode limits.
IMAGE_LOADING_FN_VAR
Widget function for the content shown when the image is still loading.
IMAGE_OFFSET_VAR
Offset applied to the image after all measure and arrange.
IMAGE_RENDERING_VAR
The Image scaling algorithm in the renderer.
IMAGE_REPEAT_SPACING_VAR
Spacing between repeated image copies.
IMAGE_REPEAT_VAR
Pattern repeat applied on the final image.
IMAGE_SCALE_FACTOR_VAR
If the image desired size is scaled by the screen scale factor.
IMAGE_SCALE_PPI_VAR
If the image desired size is scaled considering the image and screen PPIs.
IMAGE_SCALE_VAR
Scaling applied to the image desired size.

Functions§

get_img
P Gets the CONTEXT_IMAGE_VAR.
get_img_layout_size
P Gets the CONTEXT_IMAGE_VAR ideal size.
img_align
P Sets the Align of all inner images within each image widget area.
img_block_window_load
P Block window load until image is loaded.
img_cache
P Sets the cache mode of all inner images.
img_crop
P Sets a Rect that is a clip applied to all inner images before their layout.
img_downscale
P Custom pixel resize applied during image load/decode.
img_error_fn
P Sets the wgt_fn! that is used to create a content for the error message.
img_fit
P Sets the ImageFit of all inner images.
img_limits
P Sets custom image load and decode limits.
img_loading_fn
P Sets the wgt_fn! that is used to create a content for the loading message.
img_offset
P Sets a Point that is an offset applied to all inner images within each image widget area.
img_rendering
P Sets the ImageRendering of all inner images.
img_repeat
P Sets the ImageRepeat of all inner images.
img_repeat_spacing
P Sets the spacing between copies of the image if it is repeated.
img_scale
P Sets the scale applied to all inner images.
img_scale_factor
P If the image desired size is scaled by the screen scale factor.
img_scale_ppi
P Sets if the image desired size is scaled considering the image and monitor PPI.
is_error
P If the CONTEXT_IMAGE_VAR is an error.
is_loaded
P If the CONTEXT_IMAGE_VAR has successfully loaded.
on_error
P Image load or decode error event.
on_load
P Image loaded event.
source
c The image source.