diff --git a/docs/api/native-image.md b/docs/api/native-image.md index 05c86ffb0a2c..e8ca45fd262a 100644 --- a/docs/api/native-image.md +++ b/docs/api/native-image.md @@ -266,9 +266,13 @@ image instead of a copy, so you _must_ ensure that the associated Returns `Boolean` - Whether the image is empty. -#### `image.getSize()` +#### `image.getSize([scaleFactor])` -Returns [`Size`](structures/size.md) +* `scaleFactor` Double (optional) - Defaults to 1.0. + +Returns [`Size`](structures/size.md). + +If `scaleFactor` is passed, this will return the size corresponding to the image representation most closely matching the passed value. #### `image.setTemplateImage(option)` @@ -303,10 +307,18 @@ Returns `NativeImage` - The resized image. If only the `height` or the `width` are specified then the current aspect ratio will be preserved in the resized image. -#### `image.getAspectRatio()` +#### `image.getAspectRatio([scaleFactor])` + +* `scaleFactor` Double (optional) - Defaults to 1.0. Returns `Float` - The image's aspect ratio. +If `scaleFactor` is passed, this will return the aspect ratio corresponding to the image representation most closely matching the passed value. + +#### `image.getScaleFactors()` + +Returns `Float[]` - An array of all scale factors corresponding to representations for a given nativeImage. + #### `image.addRepresentation(options)` * `options` Object