Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

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()

com.amazon.kepler.uitoolkit.graphics.RectI[] 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:
  • Corner regions maintain their original size
  • Edge regions scale in one dimension
  • Center region scales in both dimensions
The rectangles are specified in the image’s coordinate space. An empty array indicates no cap insets are defined.

Returns

com.amazon.kepler.uitoolkit.graphics.RectI[] The cap inset regions in image
Last modified on October 29, 2026