Interface IImageOptions3
interface IImageOptions3
Extends IImageOptions2
This interface extends IImageOptions2 with additional functionality for
region-based decoding and capInsets of an IImage.
Cap insets define areas of an image that should not be scaled when the image
is resized, useful for creating resizable UI elements with fixed borders.
Methods
getDecodeRegion()
com.amazon.kepler.uitoolkit.graphics.RectI getDecodeRegion()
Gets the rectangular region within the source image to decode.
The region is specified in the source image’s coordinate space and returns
RectI(0,0,0,0) if decode region was not specified.
Returns
com.amazon.kepler.uitoolkit.graphics.RectI
The decode region in source image
getCapInsets()
Gets the cap inset regions for nine-slice/nine-patch scaling of this image. Cap insets define non-scaling (fixed) regions when the image is resized:com.amazon.kepler.uitoolkit.graphics.RectI[]getCapInsets()
- Corner regions maintain their original size
- Edge regions scale in one dimension
- Center region scales in both dimensions
Returns
com.amazon.kepler.uitoolkit.graphics.RectI[]
The cap inset regions in image

