mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:33:20 +08:00
22 lines
763 B
TypeScript
22 lines
763 B
TypeScript
/**
|
|
* Allows you to take pictrues with the device's camera.
|
|
*/
|
|
declare module "camera" {
|
|
|
|
import imageSource = require("image-source");
|
|
|
|
/**
|
|
* Take a photo using the camera.
|
|
* @param width - Optional parameter which defines the required width of the taken picture.
|
|
* @param height - Optional parameter which defines the required height of the taken picture.
|
|
* @param keepAspectRatio - Optional parameter which controls if the result picture will keep the aspect ratio of the picture taken by camera.
|
|
*/
|
|
export function takePicture(options?: CameraOptions): Promise<imageSource.ImageSource>;
|
|
|
|
export interface CameraOptions {
|
|
width?: number;
|
|
height?: number;
|
|
keepAspectRatio?: boolean;
|
|
}
|
|
}
|