Constructor argument requires an object with either iconName: string or parentIcon: DynamicIcon properties.
Sets/updates the image source using an evaluated string.
Loads and draws source image onto the given ctx using all current properties such as resize strategy and transformation steps.
StaticscaleScales imgRect to size of intoRect based on fit strategy. Also centers imgRect if it is smaller than intoRect in either dimension.
Modifies imgRect input, returns undefined.
Path to image file or a base-64 encoded string containing image data. Relative paths are resolved against default file path configured in plugin settings, if any.
The icon name to which this image is assigned. This is required for image cache management.
Settings to determine how images are resized to fit into drawing area.
Defines how to resize image. Equivalent to the CSS object-fit property. One of: "contain", "cover", "fill", "scale-down", or "none"
ReadonlytransformTranformation to apply to this image when drawn. See Transformation for details.
This class hold an image source (file path or b64 string) and associated data like processing options and a transformation to apply.
It makes use of a global image cache for storing & retrieving the actual images.
The
render()method will take care of any required scaling (according to the resizeOptions.fit property setting) and apply the transform, if needed.